* ensure done before checking success to help troubleshoot timeout issues
* add done check to testDefaultRetryPolicy method as well.
* ensure isDone() before other assertions
* Improve detection of resource attributes on ECS
This improves the detection of resource attributes on ECS by fetching ECS metadata from `ECS_CONTAINER_METADATA_URI` or `ECS_CONTAINER_METADATA_URI_V4`.
Previously only `CONTAINER_NAME` and `CONTAINER_ID` id were set.
Now we set:
- CONTAINER_ID
- CONTAINER_NAME
- AWS_ECS_CONTAINER_ARN
- CONTAINER_IMAGE_NAME
- CONTAINER_IMAGE_TAG
- aws.ecs.container.image.id
- AWS_LOG_GROUP_ARNS
- AWS_LOG_GROUP_NAMES
- AWS_LOG_STREAM_NAMES
- AWS_ECS_TASK_ARN
- AWS_ECS_TASK_FAMILY
- AWS_ECS_TASK_REVISION
Especially AWS_LOG_GROUP_ARNS is important so that connection of traces to logs works OOTB on X-Ray.
* Change „24“ to „26“ in fixtures for consistency
`CONTAINER_NAME` and `AWS_ECS_TASK_REVISION` should match
* Implement a few more attributes, fix ARNs
This commit adds implementations for the `aws.ecs.launchtype`
and `aws.logs.stream.arns` attributes, as well as fixing
the generation of log group ARNs.
* EcsResource: Record log group without trailing :*
Both with and without trailing `:*` are valid formats but there is a bug in the OpenTelementry collector which can’t handle the trailing `:*` (for now) (see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/13702)
So remove addition of the trailing `:*` for now.
Co-authored-by: Michele Mancioppi <michelem@lumigo.io>
* Handle ContainerResource edge case
* Simplify container id logic
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* Start from one character after last '-'
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* add some methods to ConfigProperties to help with defaulting.
* wire up default methods
* javadoc
* bots hate underscores
* leverage primitives to eliminate nullability.
* remove null check (call doesn't return null per javadoc)
* address PR comments.
* move internal method out of public interface
* roll back fallback
* rename util class
* use assertj
* spotless
* coverage
* Update sdk-extensions/autoconfigure/src/test/java/io/opentelemetry/sdk/autoconfigure/ConfigPropertiesTest.java
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* static
* spot(less)
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* Remove instrument selector predicates, add instrument name wildcards
* Cache name pattern to regex translation
* Use alternative glob match algo, get rid of cache
* Switch View and ViewBuilder to classes
* Make AttributesProcessor an empty interface, move content to AbstractAttributesProcessor
* Drop io.opentelemetry.sdk.metrics.view package
* Simplify MetricReader
* Tighten up PR
* Restore some methods / classes and deprecate
* Revert "Restore some methods / classes and deprecate"
This reverts commit fee90e5da7.
* fix:add an ending period to form notes
* feat:add the shortcut of removeif in ResourceBuilder
* fix:fix the errors of check
* feat:run two gradlew task to achieve check
* fix:fix format violations
* feat:remove extra function and modify the unit test
* fix: fix format violations
* feat:format code and modify unit test
* feat:make unit test specification
* feat:cleanup for normalize
* feat: Add enabled resource providers configuration
* style: Code style changes by running spotlessApply
* test: Add unit test for specific resource providers in both configurations
* test: Add unit test for only specific resource providers in enabled configuration
* Add experimental view config module
* Rename view-config to metric-incubator
* Switch naming from camelCase to snake_case
* Extend with attribute key filter
* Wire up to autoconfiguration
* Use snakeyaml instead of jackson
* PR feedback
* PR feedback
* Use noop meter provider if no readers registered
* Extend AutoConfigurationCustomizer with metrics customizers
* Switch from inline to instance level mocks
* Deprecate SdkMeterProviderConfigurer
* Make SPI factories instantiate implementations lazily
Previously, this would load all SPI factories and then eagerly instantiate each implementation. This would potentially result in implementations that would get instantiated even if they didn't end up getting used. An example was if the AWS contrib jar was included, this would result in an AwsXrayRemoteSampler being instantiated eagerly despite the configuration not using it. This could then result in errors or unused resources depending on the implementation i.e. in the AwsXrayRemoteSampler example it spawns a thread and makes a network request.
This change transitions the factories so that they only construct the implementation objects if the configuration specifically asks for it. Note the SPI factories themselves must still must be eagerly loaded to determine which factory names are available. This change applies to all auto-configuration areas following this pattern: Samplers, Metric Exporters, Text Map Propagators and Span Exporters.
* Now that instantiating implementations is on-demand (only if used), allow any exceptions to propagate
* format fix
* Change NamedSpiManager from interface to class
Co-authored-by: jack-berg <jberg@newrelic.com>
* refactor: adjust tracer and meter provider customizer execution order
* refactor: Modify tracer provider customizer flow
* style: Format code using spotlessApply
* ♻️ refactor TracerProviderConfiguration.configureBatchSpanProcessor to have MeterProvider provided to it
* 🐛 set meterProvider on BatchSpanProcessorBuilder
* 👌 chain usage of builder APIs where possible
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
* 🎨 formatting
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
* Switch Jaeger remote sampler to gRPC lite
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* Abstract impl
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* Service done
* Working example
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* Handle gzip compression
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* Clean dependencies
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* Remove dependency on proto
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* remove stdout
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* Fix
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* Fix logger
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* jcmpAPI failing
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* Fix
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* Fix
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* Fix
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* Switch logger
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* Fix
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* Support grpc netty too
* NPE test
* update after merge main
* Switch Jaeger remote sampler to gRPC lite
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* test
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* test
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* test
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* test
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* test
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* test
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* some tests
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* some tests
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* tls test
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* tls for default
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* Workaround logger reference issue
* Use a better logger workaround
* Wait for two polls since first poll may not have been processed by client in time for assertion.
* Don't depend on poll count for assertions.
* shutdownNow
* Cleanups
* Update logunit
* Don't stop at body read failure
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* Allow configuration of preferred temporality in LoggingMetricExporter and OtlpJsonLoggingMetricExporter
* Make InMemoryMetricReader preferred temporality configurable
* Add create() methods to LoggingSpanExporter, LoggingMetricExporter, and SystemOutLogExporter, deprecate public constructors
* Add MeterProvider to OpenTelemetry API
* Spot
* Set
* Move NoopMeter to package private
* Merge metrics API code into API package
* Finish
* Fix / clean
* Drift
* Update extensions/noop-api/src/main/java/io/opentelemetry/extension/noopapi/NoopOpenTelemetry.java
Co-authored-by: John Watson <jkwatson@gmail.com>
* Spot
Co-authored-by: John Watson <jkwatson@gmail.com>
* Add ability to configure preferred temporality to OTLP grpc and http metric exporters
* Make OTLP metric preferred temporality configurable
* Make temporality configuration case insensitive
* Add retry policy class and wire into autoconfigure
* Wire up otlp retry for DefaultGrpcExporter
* Add documentation to autoconfigure readme
* Add more tests
* Move delegate accessor to :exporters:otlp:common
* Use jackson for json serialization
* PR feedback
* Add an auto-configuration builder.
* Test
* Builder
* More
* Revamp
* Customizer only customizes
* Pass config to customizers
* More specific name
* Cleanup
* Cleanup
* SPI test
* Clean
* Clean
* Clean
* Shutdown once instead of flush and shutdown for simple
* Clean
* Cleanups
* Cleanup