Bump github.com/golangci/golangci-lint from 1.42.1 to 1.43.0 in /internal/tools.
Bump google.golang.org/grpc from 1.41.0 to 1.42.0 in /exporters/otlp/otlpmetric.
Bump go.opentelemetry.io/proto/otlp from 0.9.0 to 0.10.0 in /exporters/otlp/otlpmetric/otlpmetrichttp.
Bump go.opentelemetry.io/proto/otlp from 0.9.0 to 0.10.0 in /exporters/otlp/otlpmetric.
Bump go.opentelemetry.io/proto/otlp from 0.9.0 to 0.10.0 in /exporters/otlp/otlptrace.
Bump google.golang.org/grpc from 1.41.0 to 1.42.0 in /exporters/otlp/otlpmetric/otlpmetricgrpc.
Bump google.golang.org/grpc from 1.41.0 to 1.42.0 in /exporters/otlp/otlptrace.
Bump go.opentelemetry.io/proto/otlp from 0.9.0 to 0.10.0 in /exporters/otlp/otlptrace/otlptracehttp.
Bump google.golang.org/grpc from 1.41.0 to 1.42.0 in /exporters/otlp/otlptrace/otlptracegrpc.
Bump go.opentelemetry.io/proto/otlp from 0.9.0 to 0.10.0 in /exporters/otlp/otlpmetric/otlpmetricgrpc.
Bump go.opentelemetry.io/proto/otlp from 0.9.0 to 0.10.0 in /exporters/otlp/otlptrace/otlptracegrpc.
Bump github.com/benbjohnson/clock from 1.1.0 to 1.2.0 in /sdk/metric.
Bump google.golang.org/grpc from 1.41.0 to 1.42.0 in /example/otel-collector.
* Empty queued spans when ForceFlush called
Update the implementation of ForceFlush() to first ensure that all spans
which are queued are added to the batch before calling export spans.
Create a small ReadOnlySpan implementation which can be used as a marker
that ForceFlush has been invoked and used to notify when all spans are
ready to be exported.
Fixes#2080.
* Add a changelog entry.
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update sdk/trace/batch_span_processor.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Improve test case to verify multiple flushes.
* Refactor code to use enqueue.
* Be more defensive on waiting for queue.
Update the handling of the force flush span so we only wait on the
channel if we were able to enqueue the span to the queue.
* Fix linter.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Version stable-v1 modset to be 1.0.2 for release
* Prepare stable-v1 for version v1.0.2
* Update changelog
Add new 1.0.2 section and move relevant items that the release will
contain to this section.
* Add article to CHANGELOG entry to correct grammar
* Release 1.1.0 instead of 1.0.2
* Prepare stable-v1 for version v1.1.0
* Apply suggestions from code review
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Robert Pająk <pellared@hotmail.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
* Add ability to parse Schema files according to OTEP 0152
The parser and parsed representation (AST) are placed in a separate
Go module so that they are can be consumed independently without
the need to bring the rest of the SDK.
Ability to use the parsed representation for schema conversions
can be added later.
* Fixes based on PR comments
* Rename "label" to "attributes"
See https://github.com/open-telemetry/oteps/pull/181
* Fixes based on PR comments
* Add README.md
* Wrap the error in Parse()
* Add docs for exporter types
* Use yaml.NewDecoder
* Verify parsed content in the test
* Fix indentation in README example
* Fix README spaces vs tabs
* Correctly space imports
* Add heading to README
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move Descriptor to sdkapi, add test
* rename Descriptor to sdkapi
* precommit
* Move the rest of the sdkapi
* use alias for Observation and Measurement
* Changelog
* pr num
* comment Measurement and Observation
* swap comments
* move->moved
* Update build tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG and versions.yaml
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.0.1
* Prepare experimental-metrics for version v0.24.0
* Prepare bridge for version v0.24.0
* Update releasing documentation and create add-tags make target
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* use multimod from the .tools directory
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* precommit
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* factor instrumentation library out of the instrument descriptor
* SDK tests pass
* checkpoint work
* otlp and opencensus tests passing
* prometheus
* tests pass, working on lint
* lint applied: MetricReader->Reader
* comments
* Changelog
* Apply suggestions from code review
Co-authored-by: alrex <alrex.boten@gmail.com>
* remove an interdependency
* fix build
* re-indent one
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Lint&feedback
* update after rename
* comment fix
* style fix for meter options
* remove libraryReader, let Controller implement the reader API directly
* rename 'impl' field to 'provider'
* remove a type assertion
* move metric/registry into internal; move registry.MeterProvider into metric controller
* add test for controller registry function
* CheckpointSet->Reader everywhere
* lint
* remove two unnecessary accessor methods; Controller implements MeterProvider and InstrumentationLibraryReader directly, no need to get these
* use a sync.Map
* ensure the initOnce is always called; handle multiple errors
* Apply suggestions from code review
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* cleanup locking in metrictest
* Revert "ensure the initOnce is always called; handle multiple errors"
This reverts commit 3356eb5ed0.
* Revert "use a sync.Map"
This reverts commit ea7bc599bd.
* restore the TODO about sync.Map
Co-authored-by: alrex <alrex.boten@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update versions file for 1.0.0 release
* Prepare stable-v1 for version v1.0.0
* Update trace signal status in documentation
* Update changelog
* Update CHANGELOG.md
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* Update release versions
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare experimental-metrics for version v0.23.0
* Prepare bridge for version v0.23.0
* Prepare stable-v1 for version v1.0.0-RC3
* Update CHANGELOG
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Refactor startSpanInternal into a tracer method
The span creation and configuration process is split across the tracer
Start method and the startSpanInternal function, each living in
different files. This adds confusion when developing. It requires the
developer to remember certain parts of the configuration happen in one
place or the other.
This unifies the creation and configuration of a new span. It makes this
unification by creating a newSpan method on the tracer. This method will
do all the configuration needed for a new span other than setting the
execution task tracker. This remains a part of the Start method to
preserve any existing timing and tracing the already exists.
* Add a non-recording span to the SDK
* Assign returned context from runtime trace task
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update the website getting started docs
Add a new example, fib, that contains an application for the computation
of Fibonacci numbers. Use this example to update the website getting
started documentation.
* Revise docs english
* Update example/fib/go.mod
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a What's Next section
* Clean up intro
* Apply suggestions from code review
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Apply feedback
* Return from Poll on error
* Update website_docs/getting-started.md
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add root and parent relationship info
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* s/ValueRecorder/Histogram/g
* s/ValueObserver/GaugeObserver/g
* s/UpDownSumObserver/UpDownCounterObserver/g
* s/SumObserver/CounterObserver/g
* changelog
* pr num
* unstable->experimental
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Apply suggestions from code review
* apply feedback from @evantorrie by hand
* Apply suggestions from code review
Thanks
Co-authored-by: ET <evantorrie@users.noreply.github.com>
* Update sdk/export/metric/metric.go
* Apply suggestions from code review
Thank you @evantorrie !
Co-authored-by: ET <evantorrie@users.noreply.github.com>
* revert getting-started fix let tyler's update remove this text
* more variable name fixes
* test repair
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: ET <evantorrie@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update trace API config creation funcs
Follow our style guide and return the config struct instead of pointers.
* Update changelog with changes
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Make the tracetest.SpanRecorder concurrent safe
The otelgrpc instrumentation in the contrib repository needs a
concurrent safe implementation as the stream testing is done in a
separate goroutine.
* Refactor concurrency tests
* Deprecate Array attribute in favor of *Slice types
* Use new attr types in Jaeger exporter
* Use slice attr types in otlpmetric
* Use slice attr types in otlptrace
* Use slice attr types in zipkin exporter
* Remove array attr test from deprectated oteltest func
* Use StringSlice for cmd arg resource attr
* Add changes to the changelog
* Remove use of deprecated Array func
* Move InstrumentKind into the new metric/sdkapi package
* remove the alias
* remove the alias (everywhere)
* Changelog
* Add a test
* merge updates
* fix changelog
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Use the default SDK to test the OpenCensus bridge. In order to not add
the SDK as a dependency to the bridge module and require users to depend
on it if they use the bridge these tests are moved to a new dedicated
test module.
* 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>
* Deprecate oteltest.Harness for removal
* Add changes to changelog
* Alias oteltest.Harness to internaltest
* Update oteltest/tracer_test.go
remove `oteltest` import.
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Removed DroppedAttributeCount field from Link struct
* Reintroduced DroppedAttributeCount with a wrapper struct
* Added Link type in otel/sdk package and used it instead of Trace API equivalent
* Added changelog entry
* Linting fix in changelog
* Deleted duplicated changelog section added by mistake
* Expanded changelog entry and moved it under the 'Added' section
* Explicitly mentioned otel/trace library in changelog entry under 'Removed' section to avoid ambiguity
* remove resource.WithBuiltinDetectors() which has not been maintained
* add changelog file
* Update CHANGELOG.md
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* resolved a repeated conflict
* fix unittest error
* fix unittest error
* fix the PR according to suggestion
* fix unittest fail and del repeated testcase in CI system
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Added explicit mapping between GOOS and semconv OS type attribute value
* Added tests for OS type mappings
* Added changelog entry
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Added Linux-specific detector for the os.description attribute
* Generalized OS description detector with placeholder function for unimplemented OSes
* Extended osDescription function to *nix OSes based on golang.org/x/sys/unix
* Added WithOS resource configuration function to configure all of the OS resource attributes
* Implemented osDescription funtion for Windows OS
* Improved documentation header for *nix version of the osDescription function
* Added support for reading os-release file
* Added/updated documentation headers for *nix implementation of osDescription and related functions
* Changelog update
* Added support for reading macOS version information
* Mock approach to test OS description attribute
* Extracted common function getFirstAvailableFile to read the first available file from a list of candidates
* Upgraded golang.org/x/sys
* Changelog update
* Fixed wrong function name in documentation header for WithOSDescription
* Updated documentation header for platformOSDescription function
* Renamed restoreProcessAttributesProviders test helper function
The function restoreProcessAttributesProviders was renamed to simply
restoreAttributesProviders to better reflect its broader scope, which
not only applies to process attribute's providers.
* Fixed os_linux.go overriding build tags defined inside the file
The suffix on os_linux.go was overriding the build tags already defined
in that file. The file was renamed to os_release_unix.go, reflecting
the main function defined in the file.
For consistency, os_darwin.go was renamed to os_release_darwing.go, as
its primary purpose is to also define the osRelease function.
* Removed use of discontinued function resource.WithoutBuiltin
* Added PR number to changelog entries
* Updated go.sum files after run of make lint
* Linux implementation: ignore lines with an empty key
* Linux implementation: avoid unquoting strings less than two chars
* WIP: added tests for Linux support functions
* WIP: added tests for charsToString and getFirstAvailableFile functions
* Replaced os.CreateTemp with ioutil.TempFile as the former only exists in Go 1.16
* Added unameProvider type to decouple direct reference to unix.Uname function inside Uname()
* Added tests for Uname() function
* Replaced *os.File with io.Reader in parseOSReleaseFile to ease testing
* Added tests for parseOSReleaseFile function
* Darwin implementation: added tests for buildOSRelease function
* Replaced *os.File with io.Reader in parsePlistFile to ease testing
* Darwin implementation: added tests for parsePlistFile function
* Type in documentation header for Linux osRelease function
* Extracted logic for reading specific registry values into helper functions
* Added basic tests for Windows version of platformOSDescription and helper functions
* Manually formatted uint64 to strings to have an uniform interface for test assertions
* Asserts there's no error when opening registry key for testing
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* Simplified subtests by using a single test with multiple asserts
* go.sum update after running make
* Fix typo
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* WIP: added placeholder implementation of platformOSDescription for unsupported OSes
* Fixed typo on osRelease documentation header
Co-authored-by: Chris Bandy <bandy.chris@gmail.com>
* Fixed typo on test case name for ParsePlistFile tests
Co-authored-by: Chris Bandy <bandy.chris@gmail.com>
* Linter fix in changelog
* go.sum updates after running make
* Used strings.Replacer instead of multiple strings.ReplaceAll calls
* Optimized implementation of charsToString
* Safer temporary file deletion with t.TempDir()
* Used t.Cleanup() for safer mocking of runtime providers in OS resource tests
* Handled optionality of DisplayVersion registry key.
For example, CI machine runs on:
Windows Server 2019 Datacenter (1809) [Version 10.0.17763.1999]
So, to not add an extra white space due to missing DisplayVersion,
this value is checked to be not empty, and only in such case a
trailing space is added for that component.
* Workaround to handle the case of DisplayVersion registry key not present
* Excluded unsupported GOOSes by negation of supported ones
* go.sum update after running make
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chris Bandy <bandy.chris@gmail.com>
* add HTTP support for OTLP metrics exporter
* add to changelog
* fix unit test not covered before
* add otlpmetrichttp module to .github/dependabot.yml
* add test file for client.go
* run make commit to clean repository
* fix err occurs in TestCancelledContext
* fix err in TestCancelledContext which is nil
* fix err in TestCancelledContext which is nil, occurs occasionally
* fix unittest err in TestCancelledContext which occurs occasionally
* fix ineffectual assignment to err when running lint
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update exporters/otlp/otlpmetric/otlpmetrichttp/doc.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update exporters/otlp/otlpmetric/otlpmetrichttp/doc.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* del options that not used in http exporter metrics
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>