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

Add sdk/telemetry package #1148

Merged
merged 19 commits into from
Oct 14, 2024
Merged

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Oct 3, 2024

This package is the replacement for pdata within the sdk package.

It is designed to be ...

  • Have minimal dependencies outside of the standard library (or anything the otel package already depends on)
  • Be compatible with OTLP's protobuf JSON encoding
    • This means it will provide a forwards compatible binary encoding that users can rely on
  • Have a reasonably user friendly Go API
  • Reasonably performant

It is opinionated, and designed to work best for our needs.

Part of #954
Part of #1106
Split from #1126

Follow up work

  • Add sdk/telemetry/test pacakge to test the compatibility with pdata
  • Update the sdk package to use telemetry as its data-model

@MrAlias MrAlias marked this pull request as ready for review October 3, 2024 20:11
@MrAlias MrAlias requested a review from a team as a code owner October 3, 2024 20:11
sdk/telemetry/value.go Show resolved Hide resolved
sdk/telemetry/value.go Outdated Show resolved Hide resolved
sdk/telemetry/id.go Outdated Show resolved Hide resolved
sdk/telemetry/span.go Show resolved Hide resolved
sdk/telemetry/span.go Show resolved Hide resolved
MrAlias and others added 2 commits October 4, 2024 14:34
Co-authored-by: Ron Federman <[email protected]>
@RonFed
Copy link
Contributor

RonFed commented Oct 5, 2024

What do you think about renaming the package to something like: sdk/encoding, sdk/datamodel or sdk/data?

@MrAlias
Copy link
Contributor Author

MrAlias commented Oct 8, 2024

What do you think about renaming the package to something like: sdk/encoding, sdk/datamodel or sdk/data?

I am trying to stay away from things like data or datamodel as they are overly generic and don't explicate what they contain explicitly and are apt for name collisions with other "data-models".

Naming the package encoding was considered. However, the types themselves do not represent the actual encoding, and if it is interpreted as a verb, this would only cover part of the provided functionality (it also supports decoding). This also suffers from the "overly generic" naming issue.

I preferred using a package name that describes uniquely and clearly what the package contains. I'm open to other names, but would like something that describes telemetry data that is going to be represented and interacted with.

sdk/telemetry/resource.go Outdated Show resolved Hide resolved
sdk/telemetry/scope.go Outdated Show resolved Hide resolved
sdk/telemetry/resource.go Show resolved Hide resolved
MrAlias and others added 3 commits October 14, 2024 09:50
Handle droppedAttributesCount and dropped_attributes_count.
@MrAlias MrAlias merged commit ea85f0d into open-telemetry:main Oct 14, 2024
26 checks passed
@MrAlias MrAlias deleted the add-telemetry-pkg branch October 14, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants