Skip to content

Set default service.name if missing#616

Merged
lalitb merged 3 commits intoopen-telemetry:mainfrom
lalitb:service-name-resource
Mar 22, 2021
Merged

Set default service.name if missing#616
lalitb merged 3 commits intoopen-telemetry:mainfrom
lalitb:service-name-resource

Conversation

@lalitb
Copy link
Copy Markdown
Member

@lalitb lalitb commented Mar 19, 2021

Fixes # (issue)

Changes

The service.name attribute of Resource is mandatory and SDK should set the default value if not specified. This attribute is necessary for certain backends to identify the service that produced the spans.
as in specs:

  • service.name
    MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to unknown_service: concatenated with process.executable.name, e.g. unknown_service:bash. If process.executable.name is not available, the value MUST be set to unknown_service.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@lalitb lalitb requested a review from a team March 19, 2021 12:31
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 19, 2021

Codecov Report

Merging #616 (9f52cff) into main (07f4a96) will decrease coverage by 0.01%.
The diff coverage is 92.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #616      +/-   ##
==========================================
- Coverage   94.51%   94.50%   -0.02%     
==========================================
  Files         197      197              
  Lines        9101     9131      +30     
==========================================
+ Hits         8602     8629      +27     
- Misses        499      502       +3     
Impacted Files Coverage Δ
sdk/src/resource/resource.cc 82.60% <87.50%> (-3.11%) ⬇️
sdk/test/resource/resource_test.cc 92.85% <94.11%> (ø)

Comment thread sdk/src/resource/resource.cc
@lalitb lalitb merged commit e9c4e25 into open-telemetry:main Mar 22, 2021
GerHobbelt pushed a commit to GerHobbelt/opentelemetry-cpp that referenced this pull request Mar 6, 2026
…and-patch-dependencies

Update all minor and patch dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants