Skip to content

Conversation

@OmkarKirpan
Copy link
Contributor

@OmkarKirpan OmkarKirpan commented Jun 17, 2021

Which problem is this PR solving?

  • Fixes example code in opentelemetry-js/examples/ and uses ResourceAttributes from semantic-conventions module to access the standard resource names.

  • Since the 0.20.0 release and the pull request chore: set default service name #2227 it seems that serviceName is deprecated and we should use service.name instead. I havn't easily found this information in the changelog, it did require some digging to understand why the service name was now a very long unknown_service:/path/to/node. Documentation says use service.name Resource attribute instead. but it wasn't about replacing serviceName: 'yourServiceName' by service: { name: 'yourServiceName'}.

  • Fix for How to use service.name resource attribute since the 0.20.0 release ? How to use service.name resource attribute since the 0.20.0 release ? #2271

Short description of the changes

  • Remove serviceName from Collector exporters configuration.
  • Defining service.name resource attribute while instantiating trace provider.
  • Update examples and README to use service.name resource attribute.

Since the 0.20.0 release and the pull request open-telemetry#2227 it seems that serviceName is deprecated and we should use service.name instead. I havn't easily found this information in the changelog, it did require some digging to understand why the service name was now a very long unknown_service:/path/to/node. Documentation says use service.name Resource attribute instead. but it wasn't about replacing serviceName: 'yourServiceName' by service: { name: 'yourServiceName'}.
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jun 17, 2021

CLA Signed

The committers are authorized under a signed CLA.

removes service name option passed in exporter
@codecov
Copy link

codecov bot commented Jun 17, 2021

Codecov Report

Merging #2290 (4be67ce) into main (6fb4fd1) will increase coverage by 0.32%.
The diff coverage is n/a.

❗ Current head 4be67ce differs from pull request most recent head e488608. Consider uploading reports for the commit e488608 to get more accurate results

@@            Coverage Diff             @@
##             main    #2290      +/-   ##
==========================================
+ Coverage   92.28%   92.60%   +0.32%     
==========================================
  Files         128      142      +14     
  Lines        4210     5057     +847     
  Branches      857     1038     +181     
==========================================
+ Hits         3885     4683     +798     
- Misses        325      374      +49     
Impacted Files Coverage Δ
...ontext-async-hooks/src/AsyncHooksContextManager.ts
...async-hooks/src/AsyncLocalStorageContextManager.ts
...sync-hooks/src/AbstractAsyncHooksContextManager.ts
...kages/opentelemetry-web/src/StackContextManager.ts 97.05% <0.00%> (ø)
...ages/opentelemetry-exporter-collector/src/types.ts 100.00% <0.00%> (ø)
...emetry-instrumentation-xml-http-request/src/xhr.ts 97.58% <0.00%> (ø)
...lemetry-exporter-collector/src/transformMetrics.ts 95.71% <0.00%> (ø)
...ackages/opentelemetry-web/src/WebTracerProvider.ts 100.00% <0.00%> (ø)
...s/opentelemetry-instrumentation-fetch/src/fetch.ts 96.91% <0.00%> (ø)
packages/opentelemetry-web/src/types.ts 100.00% <0.00%> (ø)
... and 10 more

@OmkarKirpan OmkarKirpan changed the title fix: service.name resource attribute for grpc-js example fix: service.name resource attribute Jun 24, 2021
@dyladan dyladan added the document Documentation-related label Jun 25, 2021
@dyladan dyladan merged commit de6cee9 into open-telemetry:main Jun 25, 2021
@dyladan dyladan mentioned this pull request Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

document Documentation-related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants