* Removed different types of Detectors for Resources.
This change simplifies different types of collectors into one list. The
order of this list determines how they are applied. Defaults are
applied when the user does not supply any detectors. To achieve
default behavior and additional behavior a DefaultDetectors struct has been
created
* missed prometheus test.
* Changed behavior around WithDetectors(nil)
Added examples of use of WithDetectors.
* Added NoOp example
* Changed test to reflect acutal default case
This changes because WithDetector() no longer is the same as not using WithDetector()
* Unexports the noOp detector
* Updated changelog
* Fixes to spelling mistakes.
* Added NewEmptyResouce and unexported builtin detectors
* Fix for prometheus example
* Resource has two Rs
I need to get a new R key it seems.
Co-authored-by: Sam Xie <xsambundy@gmail.com>
* Replaced NewEmptyResource() with New()
* Fix test function name
* Comment fixups.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Sam Xie <xsambundy@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: update InstallNewPipeline example comment
* docs: update changelog after PR submit
* fix: wrap issue number in parens
* docs: use test example to document prometheus.InstallNewPipeline
* fix: update CHANGELOG to reflect PR state
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.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
* 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 global code to toplevel package
* Move version function to toplevel package
* Update changelog
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Move registry package under metric
* Move Number type to the metric/number subpackage
This also renames NumberKind type to Kind.
* Update changelog
* Drop outdated comment
* Export non monotonic counters as gauge values from the prometheus exporter
* Add a test to ensure the pre-existing LastValue pathway on the collector exports the last value
* Add a TODO around refactoring the prometheus test to verify metadata as well
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update metric Kind to InstrumentKind
* Update all the other modules with Kind rename
* Update metric Descriptor with instrument Kind rename
* Update other modules with Descriptor method rename
* Update OTLP exporter test field name
* Rename kind filenames
* Add changes to CHANGELOG
* Fix documentation for Grouping and PrecomputedSum
* Rename meter.go to metric.go
* Move descriptor.go into metric.go
* Move must.go into metric.go
* Move instruments into metric_instrument.go
* Rename metric api_test.go to metric_test.go
* Move instrumentkind_test.go into metric_test.go
* Rename sdkapi.go metric_sdkapi.go
* Move api/metric into otel
* Update to use moved packages
* Rename otel.go to error_handler.go
* Add changes to CHANGELOG
* Fix merge conflict resolution error
* 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
* Rename *Provider names
There is overlap in naming with MeterProviders and TracerProviders. This
is means the specification is not implemented and these types can not
exist in the same package (#1179). This makes each type and related
functions and types explicit.
* Add changes to CHANGELOG
* 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.