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
* 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
* Restore check for `http.local` attr on `http.getconn`
* Move grpctrace examples from comment to code
The example use of the interceptors in the grpctrace package includes
invalid syntax and semantics. Instead of doing this, move the example
use to example tests that will be rendered in the godocs.
* Add changes to Changelog
* Remove SDK from othttp instrumentation
* Remove dependency on SDK in api/kv pkg
Benchmark the kv package not the SDK here.
* Update api/global benchmarks
Move SDK related tests to SDK where applicable
* Add internal testing SDK implementation
To be used by the API for testing so it does not depend on the actual
SDK.
* Update api/global/internal to use internal/sdk
* Fix lint on sdk/metric benchmark
* Lint internal/sdk
* Merge internal/sdk into api/trace/testtrace
* Update Changelog
* Remove IndexedAttribute from api/label
IndexedAttribute is a synonym for IndexedLabel and a hold over from when
this iterator pattern had multiple implementations. Given it no longer
is uses, remove it to avoid introducing confusion to users.
* Update Changelog
* Update Changelog PR number
* Make the stdout exporter its own package
Follow the pattern of the other exporters.
* Update dependabot with stdout exporter
* Add replace directives for stdout exporter
* Remove outdated example test from metric SDK
* go mod tidy
* Update othttp example test
Remove unused stdout exporter.
* Remove tests in API that depend on stdout exporter
The global package does not need to be validated with the SDK. A more
properly constructed end-to-end integration test should be built if this
is actually needed.
* Add replace clause for otel in stdout go.mod
* Consolidate stdout exporter
* Move config to own file and match project standard
* Abstract Exporter into unified struct
* Rename trace part of the exporter
* Update import paths and configuration
* Update tests
* Update InstallNewPipeline to not return traceProvider
It is a registered global, access it that way.
* Update example_test
* Update docs
* Update example to be for whole package
* Update metric output
Closer match the span output.
* Clean up span output
Print as a batch and cleanup marshaling.
* Correct spelling error in doc
* Add Exporters README
* Update Changelog
* Propagate changes to rest of project
* Lint fixes
* Fix example test in metric SDK
* Add disable config options for trace and metric
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
* 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>
Currently there is no way to report errors using the global handlers for spans in the OTLP exporter, this change fixes that. Errors for the metrics exporter are already handled by the global handler.
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
* Import open-telemetry/opentelemetry-proto submodule under internal
* Commit changes in updated/new protobuf files
* Refer to new location of .pb.go files after rewrite from import
* Describe in CHANGELOG
* Add protogen workflow
* Move out protobuf generation to Makefile.proto
* Include in Changelog
* Update Makefile.proto
Move file-local mode variable to line by itself.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add sem-conv for OS process as resource attr keys
Resolves#891
* Add PR number to Changelog
* Apply suggestions from code review
Co-authored-by: ET <evantorrie@users.noreply.github.com>
* Update comments to Linux
Co-authored-by: ET <evantorrie@users.noreply.github.com>
* Update grpctrace instrumentation span names
Span names MUST not contain the leading slash (`/`) that the grpc
package prepends to all `FullMethod` values. This replaces the
`serviceFromFullMethod` function with a parsing function. This parsing
function returns an span name adhering to the OpenTelemetry semantic
conventions as well as formatted span attributes.
Additionally, the service name needs to include the package if one
exists. This updates that attribute accordingly.
Once #900 is merged the method attributes can be added by uncommenting.
Resolves#916
* Update Changelog
* Update comment to plural
* Switch from regexp to string parsing
* Consolidate attributes before creating span
* Update Changelog with addition of rpc.method in grpctrace
* Fix test spanMap lookup key
* Update instrumentation/grpctrace/interceptor.go
Co-authored-by: ET <evantorrie@users.noreply.github.com>
* Unify on explicit typed return value
* Fix copy paste error
Co-authored-by: ET <evantorrie@users.noreply.github.com>
* Add http content size to standard package
Signed-off-by: Sam Xie <xsambundy@gmail.com>
* Include `http.request_content_length` in HTTP request basic attributes
Signed-off-by: Sam Xie <xsambundy@gmail.com>
* Add test for api.standard package
Signed-off-by: Sam Xie <xsambundy@gmail.com>
* Update CHANGELOG
Signed-off-by: Sam Xie <xsambundy@gmail.com>
* Fix http content size naming
Signed-off-by: Sam Xie <xsambundy@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>