* 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>
* 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>
This method did not have any effect. had been used back
when exporters were providing utility methods for setting up full
pipelines. These utilities went away in
4883cb119d.
* 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>
* 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>
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.
* 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>
* Split stdout exporter into stdouttrace and stdoutmetric
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Remove unused options from stdouttrace and stdoutmetric exporters
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update stdout exporter references in website docs
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update docs to include correct import paths, properly describe exporter scope
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Remove pointless options to disable signals from what are now single-signal exporters
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Rename exporters/metric/prometheus
* Rename exporters/trace/jaeger
* Rename exporters/trace/zipkin
* Fix dependabot config and make test
* Update README docs
* Deprecate exporters instead of remove them
* Update dependabot with old modules
* Run crosslink
* Add lint override for known deprecated pkg
* Update PR number
* Remove trace export support from exporters/otlp
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update otlp exporter example test to use metric/global package
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* completely excise exporters/otlp
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Declare internal/metric module to version it separately
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Remove dependency on metrics module from soon-to-be-stable modules
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Add PR ID to CHANGELOG
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* rename metric/oteltest to metric/metrictest
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Fix metrictest package name in CHANGELOG
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.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>
This patch removes `ApplyConfig` method and `Config` struct from
`go.opentelemetry.io/otel/sdk/trace` package. To ensure valid config
for TracerProvider, it adds `ensureValidTracerProviderConfig` private
function.
Jaeger and Zipkin have been used the `Config` directly across package
boundaries. Since `Config` is removed, they can't use it. This change,
thus, replaces `WithSDK` with `WithSDKOptions`.
Resolves#1636, #1705.
* chore(zipkin): improves zipkin example to not to depend on timeouts.
* chore: improves variable name
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* chore(zipkin): makes lint happy.
* fix(zipkin): fixes example
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* fix(zipkin): import.
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
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>
* Move global code to toplevel package
* Move version function to toplevel package
* Update changelog
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update codes to match specification
* Add changes to changelog
* go mod tidy
* Add unit tests for codes
* Update SetStatus methods to only filter Unset
* Update apitest code being tested
* Change name of ProbabilitySampler to TraceIdRatioBased
* Modify behavior to ignore parent span
* Add test for inclusivity property on TraceIdRatioBased sampler
* Modify tests in `trace_test.go` to reflect change in parent
span behavior
* Add to CHANGELOG
* Satisfy golint
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Move proto to OTLP exporter
* Update OTLP exporter import of proto
* Use gogo protobuf
To stop using the deprecated github.com/golang/protobuf and match what
the collector is doing, switch to generating OTLP with the
github.com/gogo/protobuf/proto instead of
github.com/golang/protobuf/proto.
* Clean dependencies
Remove all protobuf dependencies from otel package and all of its
dependencies.
* Update CHANGELOG
* Clean OTLP exporter go mod
Remove submodule beforehand to avoid unneeded direct dependencies.
* Use default ref for GitHub workflow
* Update path that triggers proto gen action
* Correct license-check exclusion for OTLP
* Update commented location of the OTLP and code
* Clean stale indirect dependency requirements
In the recent changes to isolate the main `otel` package there were many
indirect dependencies of the package that were removed, however, the
go.mod was not automatically cleaned of these. This removes those (and
similar ones in the otel-collector example and otel exporter) and prunes
the go.sum files accordingly.
* Run in a clean system to reproduce build
* Make opentracing bridge into own Go module
* Update dependabot config
* Clean dependencies of project
Now the bridge is a module, clean all upstream modules that no longer
implicitly depend on it.
* Update Changelog
* go mod tidy
http.ResponseWriters may implement additional interfaces
(http.CloseNotifier, http.Flusher, http.Hijacker, http.Pusher,
io.ReaderFrom) that get lost when the ResponseWriter is wrapped in
another object. This change uses the httpsnoop package to wrap the
ResponseWriter so that the resulting object implements any of the
optional interfaces that the original ResponseWriter implements as
well as using the replacement ResponseWriter methods that gather
information for tracing.
* Remove otel/sdk dependency from grpctrace
Use otel/trace/testtrace instead and cleanup testing code.
* Update httptrace to not depend on the SDK
Update testing to use api/trace/testtrace instead.
* Add changes to Changelog
* Make the SDK its own Go module
* Upgrade go.mod to 1.14 project wide
* go mod tidy
* Adjust Jaeger and Zipkin exporters helper methods
* Update and add tests, examples, various minor improvements
* Update changelog
* Correct the Zipkin example
- wait for the spans to be exported
- rebuild the example
* Zipkin service name as argument
* Rework Jaeger and Zipkin tests
* Include more detailed Changelog
Co-authored-by: ET <evantorrie@users.noreply.github.com>
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Avoid applying stale udpates; add a test
* Add Memory option to basic processor
* Always use memory in the pull controller
* Test the memory option
* Precommit
* Add a Prometheus-specific test
* More comment on Memory option
* Link to 862
* Remove sleep
* Update changelog
* Comment on stale and stateless aggregators
* Update sdk/metric/processor/basic/config.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* add optional server url arg to http client example
Signed-off-by: Andrew Hsu <xuzuan@gmail.com>
* add Dockerfile to build example http images
Multi-stage Dockerfile with targets for building example http server and
client.
$ docker build --tag the-server --target example-http-server .
$ docker build --tag the-client --target example-http-client .
Signed-off-by: Andrew Hsu <xuzuan@gmail.com>
* add docker-compose.yml file for running examples
This docker compose configuration file will help a new user to compile
and run the example code quickly. Uses the Dockerfile to build images
with compiled examples.
$ docker-compose build http-server http-client
$ docker-compose up http-server http-client
Signed-off-by: Andrew Hsu <xuzuan@gmail.com>
* add newline to last message of example http client
Signed-off-by: Andrew Hsu <xuzuan@gmail.com>
* add optional collector url arg to zipkin client example
Signed-off-by: Andrew Hsu <xuzuan@gmail.com>
* add Dockerfile target to build zipkin client
For building the example zipkin client:
$ docker build --tag zipkin-client --target example-zipkin-client .
Signed-off-by: Andrew Hsu <xuzuan@gmail.com>
* add docker compose service to run zipkin examples
Services to run the zipkin client along with a zipkin collector:
$ docker-compose build zipkin-client
$ docker-compose up zipkin-collector zipkin-client
Since the zipkin collector takes a few seconds before it is ready to
receive traces, I added a simple retry loop to the client command.
The collector service exposes port 9411 so user can visit
http//localhost:9411/ to see the trace sent to the collector. Be sure to
search by the trace id logged by the client.
Signed-off-by: Andrew Hsu <xuzuan@gmail.com>
* Update Dockerfile with AL2 declaration
As described in https://www.apache.org/licenses/LICENSE-2.0#apply
Co-Authored-By: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update docker-compose.yml with AL2 declaration
As described in https://www.apache.org/licenses/LICENSE-2.0#apply
Co-Authored-By: Tyler Yahn <MrAlias@users.noreply.github.com>
* pass server url as flag in example http client
$ ./client -h
Usage of ./client:
-server string
server url (default "http://localhost:7777/hello")
Signed-off-by: Andrew Hsu <xuzuan@gmail.com>
* pass zipkin url as flag in example zipkin client
$ ./zipkin -h
Usage of ./zipkin:
-zipkin string
zipkin url (default "http://localhost:9411/api/v2/spans")
Signed-off-by: Andrew Hsu <xuzuan@gmail.com>
* move Dockerfile and docker-compose.yml into example dir
Signed-off-by: Andrew Hsu <xuzuan@gmail.com>
* add Dockerfile and docker-compose.yml for zipkin example
Signed-off-by: Andrew Hsu <xuzuan@gmail.com>
* update zipkin example README.md
With instructions on how to use docker-compose to run the example.
Signed-off-by: Andrew Hsu <xuzuan@gmail.com>
* add http example README.md
With instructions on how to use docker-compose to run the example.
Signed-off-by: Andrew Hsu <xuzuan@gmail.com>
* Update example/http/Dockerfile WORKDIR
Co-Authored-By: Krzesimir Nowak <qdlacz@gmail.com>
* Update example/http/Dockerfile RUN go install
Co-Authored-By: Krzesimir Nowak <qdlacz@gmail.com>
* Update example/http/Dockerfile RUN go install
Co-Authored-By: Krzesimir Nowak <qdlacz@gmail.com>
* Update example/zipkin/Dockerfile WORKDIR
Co-Authored-By: Krzesimir Nowak <qdlacz@gmail.com>
* Update example/zipkin/Dockerfile RUN go install
Co-Authored-By: Krzesimir Nowak <qdlacz@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Krzesimir Nowak <qdlacz@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Update license header to standard format for source files missed prior.
Add license header to new source files.
Add Makefile check to test all `*.go` and `*.sh` files have a copyright
notice (or comment about them being auto-generated) within the first few
lines.
* Add zipkin exporter
The zipkin exporter implements the SpanBatcher interface. It follows
the current-at-the-time-of-writing document about conversion from
OpenTelemetry span data to Zipkin spans. Which means that endpoint
information is not yet filled.
* Fix typo in docs
* Add a zipkin example
This sends span information to a locally running zipkin collector.
Currently I have a problem getting the collector to show me the spans
after accepting them with HTTP 202. Not sure if this is because of
missing endpoint information.
* Make gitignore consistent
The fixed paths should be prefixed with a slash. The "relative" paths
mean that git will ignore all the files that end with the path.
* Add tests for zipkin exporter