* Jaeger exporter now populate Jaeger's Span Process from Resource
* Remove jaeger.WithProcess
* Fix tests
* Change the type of default service name into string
* Add tests
* Update CHANGELOG
* Use the API from `Set` to fetch service name in exporter
* Fix nits
* Add more test cases for jaegerBatchList function
* precommit
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Rename resource pkg label vars and methods
The former `labels` package is now named `attributes` to conform with
the specification requirement. This removes the lingering `label` term
from the `resource` package.
Resolve https://github.com/open-telemetry/opentelemetry-go/issues/1691
* Update PR number in CHANGELOG
* Propagate rename to the prometheus exporter pkg
* Make SpanContext Immutable
* Adds NewSpanContext() constructor and SpanContextConfig{} struct for
constructing a new SpanContext when all fields are known
* Adds With<field>() methods to SpanContext for deriving a SpanContext
with a single field changed.
* Updates all uses of SpanContext to use the new API
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Add tests for new SpanContext constructor and derivation
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Address PR feedback
* Fix new uses of SpanContext from main
* sdk/trace: add missing options to tracer provider
This change adds `WithDefaultSampler` and `WithSpanLimits` to the tracer
provider and removed `WithConfig` from it.
Before this change, `WithConfig` is the only way to set sampler or
limits of a span. However, it is prone to misuse, since `WithConfig` can
override tracing configurations that are configured by `WithResource` or
`WithIDGenerator`. Thus to fix this, it adds new functional options -
`WithDefaultSampler` and `WithSpanLimits` and removes `WithConfig`.
Resolves#1631.
* Update sdk/trace/provider.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update sdk/trace/provider.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* rebase and remove WithConfig
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
to provide consistent naming across the code base, deprecate pusher in
favor of exporter naming convention.
Signed-off-by: ldelossa <ldelossa@redhat.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Set span status code, message and ref types according to the spec
* Serialize array attributes as string
* Use correct lib name / version key
* Add new and adjust existing tests
* Update CHANGELOG
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add HTTP/JSON to the otlp exporter
Co-Authored-By: Roy van de Water <72016+royvandewater@users.noreply.github.com>
* PR fixup
Co-authored-by: Roy van de Water <72016+royvandewater@users.noreply.github.com>
* Updating documentation with an working example for creating NewExporter
* Updated Changelog
* Moved examples in README to testing example
* ExampleTest shouldn't log anything if working as expected
* Fixing the lint
* Fixing the lint
* Review comments
* Changes done moved to Fixed section of Changelog
* Fix Windows build of Jaeger tests
The Jaeger tests use the low-level syscall package. The Windows specific
function called in that package has a different function signature than
the unix version. Add a windows specific file using the build flags to
isolate this OS specific functionality.
* Add changes to changelog
* Blind succeed to account for unimplemented functionality on Windows
* Fix stdout TestStdoutTimestamp failure with sleep
Ensure the test condition is valid by introducing minimal sleep
durations before and after a timestamp is measured.
Resolves#1571
* Add changes to changelog
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* 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#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>
* Add a tool to auto-generate replace directives
* Auto-generated changes from previous commit
* Create new modules required for trace release
* otel/metric
* otel/trace
* otel/oteltest
* otel/sdk/export/metric
* otel/sdk/metric
Relates to #1467
* Move metric-related public API out of otel/ pkg
Move GetMeterProvider, Meter and SetMeterProvider to new package
otel/metric/global in the otel/metric module.
This will allow otel/ module to be released as v1.0.
* Include PR references in CHANGELOG
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Check for root dir
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add a Config/Option for histogram
* Just one option here
* Test fixes
* Support and test int64 histograms
* Changelog
* Lint
* Un-export three things.
* Push->basic
* Repackage
* Rename away from push
* Make exporter optional; export from a separate goroutine
* Move pull_test into controller_test
* Precommit pass
* New OTLP/Prom example
* Precommit
* Fix the example
* Shorten the example
* Test starting controller w/o exporter
* Test export timeout
* Remove ancient example & lint
* go.mod revert & tidy
* Comments
* Tidy a diff
* Tidy a diff
* Move export kind selector in the new example
* Split this test into its original parts
* Reduce diff size
* Changelog
* Remove extra Add/Done pair
* Remove unused stopCh param; document the Stop behavior
* Typo
* Use ctx
* Missed v0.15
* Apply PR feedback
* Precommit pass
* 0.14 -> 0.15 in new file
* Remove diff chunk markers
* Fix OTLP example
* Upstream
* dashpole comments
* aneurysm9 feedback
* Tidy go.sum
* Move grpc stuff to separate package
* Drop duplicated retryable status code
* Set default port to 4317
This is what the specification says for both gRPC and HTTP.
* Document gRPC option type
* Add an HTTP protocol driver for OTLP exporter
Currently it supports only binary protobuf payloads.
* Move end to end test to a separate package
It also adds some common code mock collectors can use. This will be
useful for testing the HTTP driver.
* Move export data creators to otlptest
It also extends the one record checkpointer a bit. This will be useful
for testing the HTTP driver.
* Add an HTTP mock collector and tests for HTTP driver
* Update changelog
* Do not depend on DefaultTransport
We create our own instance of the transport, which is based on
golang's DefaultTransport. That way we sidestep the issue of the
DefaultTransport being modified/overwritten. We won't have any panics
at init. The cost of it is to keep the transport fields in sync with
DefaultTransport.
* Read the whole response body before closing it
This may help with connection reuse.
* Change options to conform to our style guide
* Add jitter to backoff time
* Test TLS option
* Test extra headers
* Fix a comment
* Increase coverage
* Add a source of the backoff strategy
* Rename `otlp.WithAddress` to `otlp.WithEndpoint`
* Unify the term of the endpoint from exporter
* Update CHANGELOG
* Update example/otel-collector/main.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Switch to the full word collector
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com>
* Add a split protocol driver
This is a wrapper around two other protocol drivers, so it makes it
possible to send traces using a different protocol than the one used
for metrics.
* Add an example and tests for multi GRPC endpoint driver
* Update changelog
* Document the split driver