* Add internaltest templates
* Generate internaltest using gotmpl
* Generate the sdk/internal/internaltest pkg
* Use sdk/internal/internaltest in sdk module
* Generate exporters/jaeger/internal/internaltest pkg
* Use exporters/jaeger/internal/internaltest in jaeger exporter
* Generate the exporters/zipkin/internal/internaltest pkg
* Use local internaltest in zipkin exporter
* Fix import path name in trace test
* Upgrade all use of semconv to v1.21.0
* Add change to changelog
* Add AIX and ZOS OS support
* Upgrade semconv for merged changes
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* Decode values from OTEL_RESOURCE_ATTRIBUTES
The W3C spec specifies that values must be percent-encoded so when
reading the environment variable `OTEL_RESOURCE_ATTRIBUTES` the SDK
should decode them.
This is done by the `baggage` package, but its behaviour in case of
errors is slightly different from the current implementation of the SDK,
more specifically in cases where a key is missing a value. The SDK
returns a partial resource while the `bagage` package returns nil.
This may be considered a breaking change, so this commit fixes the
current implementation instead of using `baggage.Parse`.
* Add changelog entry for #2963
* Use otel.Handle on OTEL_RESOURCE_ATTRIBUTES decode error
* retain original value when decoding fails
* docs: update CHANGELOG
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* No wrap RELEASING Semantic Convention Generation section
* Initial generator
* Update template render
* Add exception and schema templates
* Add semconv/internal http unification
* Add http template
* Add licenses header
* Embed the templates
* Update static version in schema tmpl
* Add semconv-generate target to Makefile
Use this target to generate versions of the semconv packages.
* Generate semconv packages
* Update RELEASING to use make semconv-generate
* Add comments to semconvkit
* Generate semconv/v1.8.0
* Use new version of semconv
* Add changes to changelog
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add semconv/v1.7.0 package
Generated from the v1.7.0 release of the specification using the
semconvgen tool manually. This also updates the project to use this
version of the semconv package.
This does not include the prior, and missing, v1.5.0 and v1.6.0 versions
of the semconv package. They are planned to be added in a follow-on PR.
* Update CHANGELOG.md
* fix(2138): add guard to constructOTResources to return an empty resource when attributes are not supplied
Fixes: https://github.com/open-telemetry/opentelemetry-go/issues/2138
* Update CHANGELOG.md
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
This implements specification requirement:
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/sdk.md#resource-creation
- Changes `resource.NewWithAttributes` to require a schema URL. The old function
is still available as `resource.NewSchemaless`. This is a breaking change.
We want to encourage using schema URL and make it a conscious choice to have a
resource without schema.
- Merge schema URLs acccording to the spec in resource.Merge.
- Several builtin resource detectors now correctly populate the schema URL.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* sdk/resource: honor OTEL_SERVICE_NAME in fromEnv resource detector
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* go fmt is still my friend, even if I forget about it occasionally
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Fix import ordering
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Removed different types of Detectors for Resources.
This change simplifies different types of collectors into one list. The
order of this list determines how they are applied. Defaults are
applied when the user does not supply any detectors. To achieve
default behavior and additional behavior a DefaultDetectors struct has been
created
* missed prometheus test.
* Changed behavior around WithDetectors(nil)
Added examples of use of WithDetectors.
* Added NoOp example
* Changed test to reflect acutal default case
This changes because WithDetector() no longer is the same as not using WithDetector()
* Unexports the noOp detector
* Updated changelog
* Fixes to spelling mistakes.
* Added NewEmptyResouce and unexported builtin detectors
* Fix for prometheus example
* Resource has two Rs
I need to get a new R key it seems.
Co-authored-by: Sam Xie <xsambundy@gmail.com>
* Replaced NewEmptyResource() with New()
* Fix test function name
* Comment fixups.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Sam Xie <xsambundy@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>