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

Access application version in components #1559

Closed
james-bebbington opened this issue Aug 17, 2020 · 3 comments
Closed

Access application version in components #1559

james-bebbington opened this issue Aug 17, 2020 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@james-bebbington
Copy link
Member

james-bebbington commented Aug 17, 2020

Is your feature request related to a problem? Please describe.
I would like to include the application version in metadata on requests sent by an exporter.

Describe the solution you'd like
Add the version string to the parameters passed to components on initialization, i.e. update https://github.com/open-telemetry/opentelemetry-collector/blob/v0.8.0/component/exporter.go#L97 (similar for other components)

When building the pipelines, set this value based on the value provided in https://github.com/open-telemetry/opentelemetry-collector/blob/v0.8.0/service/service.go#L109

@james-bebbington james-bebbington changed the title Access app version in components Access application version in components Aug 17, 2020
@nilebox
Copy link
Member

nilebox commented Aug 17, 2020

While version is the immediate use case that needs this feature, it may make more sense to support a generic way of passing the pipeline-level metadata.

e.g. if in the exporter we want to distinguish the "distro" it's being used in (opentelemetry-collector, opentelemetry-collector-contrib, or some vendor-specific binary like GoogleCloudPlatform/opentelemetry-operations-collector), we may declare a struct like

type ApplicationInfo interface {
  Name() string    // e.g. "opentelemetry-collector"
  Version() string // e.g. "v0.10.0"
}

and pass it to all component constructors.

@james-bebbington
Copy link
Member Author

james-bebbington commented Aug 17, 2020

we may declare a struct ... and pass it to all component constructors.

Good point - maybe we could just pass in the ApplicationStartInfo struct directly: https://github.com/open-telemetry/opentelemetry-collector/blob/v0.8.0/service/service.go#L101

@andrewhsu
Copy link
Member

Closing this as done because PR #1582 was merged

MovieStoreGuy pushed a commit to atlassian-forks/opentelemetry-collector that referenced this issue Nov 11, 2021
* Vendor Thrift dependency

* Fix build

* Changelog entry

* Ignore third_party for coverage purposes

* Re-run tests

* Re-run tests

* Re-run tests

* Re-run tests

* Relax time comparisons

Fixes open-telemetry#1559.

Some unit tests were flaking in CI because they expected the timestamp
to advance during a test, when it's possible for it to be unchanged
instead. This change switches the offending "<" comparisons to "<=".

* Re-run tests

* Relax more time comparisons

* Re-run tests

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
MovieStoreGuy pushed a commit to atlassian-forks/opentelemetry-collector that referenced this issue Nov 11, 2021
* Stagger timestamps in exact aggregator tests

Fixes open-telemetry#1559.

* Missed one

* Yield while you wait

* Just sleep for a teeny tiny bit

* Oops, wrong PR in Changelog

* Make sure that *some* time passes

* Keep time comparisons relaxed
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this issue Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants