1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-12 10:04:29 +02:00
opentelemetry-go/instrumentation/grpctrace
Tyler Yahn 54fffd6467
Update grpctrace instrumentation span names (#922)
* Update grpctrace instrumentation span names

Span names MUST not contain the leading slash (`/`) that the grpc
package prepends to all `FullMethod` values. This replaces the
`serviceFromFullMethod` function with a parsing function. This parsing
function returns an span name adhering to the OpenTelemetry semantic
conventions as well as formatted span attributes.

Additionally, the service name needs to include the package if one
exists. This updates that attribute accordingly.

Once #900 is merged the method attributes can be added by uncommenting.

Resolves #916

* Update Changelog

* Update comment to plural

* Switch from regexp to string parsing

* Consolidate attributes before creating span

* Update Changelog with addition of rpc.method in grpctrace

* Fix test spanMap lookup key

* Update instrumentation/grpctrace/interceptor.go

Co-authored-by: ET <evantorrie@users.noreply.github.com>

* Unify on explicit typed return value

* Fix copy paste error

Co-authored-by: ET <evantorrie@users.noreply.github.com>
2020-07-09 13:12:00 -07:00
..
grpctrace.go Add option to specify propagators to use with grpctrace Extract and Inject 2020-06-01 13:56:53 -04:00
interceptor_test.go Update grpctrace instrumentation span names (#922) 2020-07-09 13:12:00 -07:00
interceptor.go Update grpctrace instrumentation span names (#922) 2020-07-09 13:12:00 -07:00