boostchicken

moonheart

switch span.Type {

case “web”:

newSpan.SetKind(ptrace.SpanKindServer)

case “custom”:

newSpan.SetKind(ptrace.SpanKindUnspecified)

default:

newSpan.SetKind(ptrace.SpanKindClient)

}

dest := ptrace.NewTraces()

resSpans := dest.ResourceSpans().AppendEmpty()

resSpans.SetSchemaUrl(semconv.SchemaURL)

jpkrohling

@@ -124,6 +124,7 @@ pkg/winperfcounters/ @open-telemetry/collect
pkg/batchperresourceattr/ @open-telemetry/collector-contrib-approvers @atoulme @dmitryax

pkg/experimentalmetricmetadata/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick





read_timeout: 60s

“`



### endpoint (Optional)

config.ReceiverSettings `mapstructure:”,squash”`

confighttp.HTTPServerSettings `mapstructure:”,squash”`

// ReadTimeout of the http server

ReadTimeout time.Duration `mapstructure:”read_timeout”`



err = decodeRequest(req, &ddTraces)

if err != nil {

http.Error(w, “Unable to unmarshal reqs”, http.StatusInternalServerError)

}



func translateDataDogKeyToOtel(k string) string {

// Tags prefixed with _dd. are for Datadog’s use only, adding them to another backend will just increase cardinality needlessly

MovieStoreGuy

func (ddr *datadogReceiver) Start(_ context.Context, host component.Host) error {

go ddr.startOnce.Do(func() {

defer ddr.shutdownWG.Done()

ddmux := mux.NewRouter()

ddmux.HandleFunc(“/v0.3/traces”, ddr.handleTraces)

ddmux.HandleFunc(“/v0.4/traces”, ddr.handleTraces)

ddmux.HandleFunc(“/v0.5/traces”, ddr.handleTraces)

ddr.server.Handler = ddmux

if err := ddr.server.ListenAndServe(); err != http.ErrServerClosed {

host.ReportFatalError(fmt.Errorf(“error starting datadog receiver: %w”, err))

}

})

ddr.shutdownWG.Add(1)

TylerHelmuth

@@ -167,6 +168,7 @@ receiver/cloudfoundryreceiver/ @open-telemetry/collect
receiver/collectdreceiver/ @open-telemetry/collector-contrib-approvers @atoulme

receiver/couchdbreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski

receiver/dockerstatsreceiver/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick @jamesmoessis

receiver/datadogreceiver/ @open-telemetry/collector-contrib-approvers @boostchicken

aybabtme

go ddr.startOnce.Do(func() {

defer ddr.shutdownWG.Done()

ddmux := mux.NewRouter()

ddmux.HandleFunc(“/v0.3/traces”, ddr.handleTraces)

ddmux.HandleFunc(“/v0.4/traces”, ddr.handleTraces)

ddmux.HandleFunc(“/v0.5/traces”, ddr.handleTraces)

ddr.server.Handler = ddmux

if err := ddr.server.ListenAndServe(); err != http.ErrServerClosed {

host.ReportFatalError(fmt.Errorf(“error starting datadog receiver: %w”, err))

}

})

ddr.shutdownWG.Add(1)

aybabtme

err = ddr.Start(context.Background(), componenttest.NewNopHost())

assert.NoError(t, err, “Server should start”)



err = ddr.Shutdown(context.Background())

assert.NoError(t, err, “Server should stop”)

Read More