Nordstrom / ctrace

Canonical OpenTracing
Apache License 2.0
6 stars 1 forks source link

Need serviceName as top-level field to distinguish among different services #4

Closed StephenWithPH closed 7 years ago

StephenWithPH commented 7 years ago

Similar to other OpenTracing-compatible tracers, we should include serviceName at the top level. See https://github.com/uber/jaeger-client-go/blob/master/tracer.go#L70 and https://github.com/instana/golang-sensor/blob/master/README.md#opentracing for example.

I suggest that we read the service's name from an environment variable; we can omit the serviceName field when that environment variable is not set. I believe that's more user-friendly than failing (see https://github.com/uber/jaeger-client-go/blob/fda19be2a9d607293e27e71c22da9e166b53ec5a/config/config.go#L105).

StephenWithPH commented 7 years ago

We have settled on a service as the tag in our implementations. See https://github.com/Nordstrom/ctrace-go/pull/8.

This was documented in the spec with this commit: https://github.com/Nordstrom/ctrace/commit/5cf70158e9edbd3f8dba53ef797c4d497b004c7b

For reference, here's a similar discussion at OpenTracing: https://github.com/opentracing/specification/issues/77

suplizio commented 7 years ago

There's not a more agnostic approach we could use that can be respected by our Nordstomr external platform/partner integrations? For example, for correlation propagation the ask would be for that partner/platform to respect and generate a Nordstrom-specific "CT-Trace-Id" header?