Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review semantic conventions specifications #932

Closed
codeboten opened this issue Jul 22, 2020 · 9 comments
Closed

Review semantic conventions specifications #932

codeboten opened this issue Jul 22, 2020 · 9 comments
Assignees
Labels
release:required-for-ga To be resolved before GA release

Comments

@codeboten
Copy link
Contributor

Part of the work for GA is to review semantic conventions spec and ensure our implementation is correct

@codeboten codeboten added bug Something isn't working release:required-for-ga To be resolved before GA release and removed bug Something isn't working labels Jul 22, 2020
@aabmass
Copy link
Member

aabmass commented Aug 5, 2020

tick things off as separate issues are created

@codeboten
Copy link
Contributor Author

* [ ]  There is no default resource detector to populate [standard resource names](https://github.com/open-telemetry/opentelemetry-specification/tree/master/specification/resource/semantic_conventions) (not sure if this is in scope)

Any thoughts on whether the telemetry.sdk.* values should be set in the Resource itself or via a ResourceDetector?

@aabmass
Copy link
Member

aabmass commented Aug 7, 2020

I would say a resource detector because to keep the empty resource around. We already have this

class OTELResourceDetector(ResourceDetector):
# pylint: disable=no-self-use
def detect(self) -> "Resource":

But what is the story for including these required resources labels, without any configuration?

@codeboten
Copy link
Contributor Author

Not sure about the other attributes, but at least in the telemetry.sdk.* case they could be set in the OTelResourceDetector to

telemetry.sdk.name=opentelemetry
telemetry.sdk.language=python
telemetry.sdk.name=pkg_resources.get_distribution(
    "opentelemetry-sdk"
).version

@aabmass
Copy link
Member

aabmass commented Aug 11, 2020

After discussing with some others, I think these telemetry properties should be set in the Tracer/Meter providers and not a detector, so that they are automatic.

I also missed this part of the resource semantic conventions:

Certain attribute groups in this document have a Required column. For these groups if any attribute from the particular group is present in the Resource then all attributes that are marked as Required MUST be also present in the Resource. However it is also valid if the entire attribute group is omitted (i.e. none of the attributes from the particular group are present even though some of them are marked as Required in this document).

So the "required fields" are only required if any of service.* are set.

@lzchen
Copy link
Contributor

lzchen commented Aug 11, 2020

@aabmass
Curious, if we were to go the detector route, we would be instantiating a default resource detector which would probably be global correct, which after would automatically create a Resource with those "standard resources" and passed in whenever Tracer/Meter providers are instantiated. I guess the benefit of this would be we can define all the "standard" stuff in one place, where as setting in both Tracer/Meter we would have to make sure they are consistent (maybe just a function?)

@aabmass
Copy link
Member

aabmass commented Aug 11, 2020

@lzchen From how the resource detection OTEP is written, I don't think the resource detector is global. It's just an interface and the user uses one or more of them at startup to create a merged resource object. It does talk about a default resource detector, but I think James is thinking of changing this when he actually writes the spec.

cc @james-bebbington who worked on the OTEP and is starting to write the spec. He suggested yesterday doing it right in the providers.

@aabmass
Copy link
Member

aabmass commented Sep 2, 2020

Ok, I think the only thing remaining here is these service.* resource labels. My understanding now is that, if the user is instrumenting a service, they should pass these labels (although it's not strictly required) to indicate that it is a service. Should we have code to make this easy for the user? I don't think many instrumenting users would read the spec and decide to pass it on their own. Maybe this should be brought up in the spec repo?

@codeboten
Copy link
Contributor Author

Closing this issue, will create separate issues as needed.

srikanthccv pushed a commit to srikanthccv/opentelemetry-python that referenced this issue Nov 1, 2020
)

Co-authored-by: Mayur Kale <mayurkale@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:required-for-ga To be resolved before GA release
Projects
None yet
Development

No branches or pull requests

3 participants