Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
// Copyright The OpenTelemetry Authors
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
|
|
|
package metric
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"sync"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
|
|
|
|
"go.opentelemetry.io/otel/attribute"
|
|
|
|
"go.opentelemetry.io/otel/metric"
|
|
|
|
"go.opentelemetry.io/otel/metric/instrument"
|
|
|
|
"go.opentelemetry.io/otel/sdk/instrumentation"
|
2022-11-11 19:10:59 +02:00
|
|
|
"go.opentelemetry.io/otel/sdk/metric/aggregation"
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
"go.opentelemetry.io/otel/sdk/metric/metricdata"
|
|
|
|
"go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest"
|
2022-09-22 18:18:18 +02:00
|
|
|
"go.opentelemetry.io/otel/sdk/resource"
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
// A meter should be able to make instruments concurrently.
|
|
|
|
func TestMeterInstrumentConcurrency(t *testing.T) {
|
|
|
|
wg := &sync.WaitGroup{}
|
|
|
|
wg.Add(12)
|
|
|
|
|
|
|
|
m := NewMeterProvider().Meter("inst-concurrency")
|
|
|
|
|
|
|
|
go func() {
|
2023-01-03 20:34:10 +02:00
|
|
|
_, _ = m.Float64ObservableCounter("AFCounter")
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
wg.Done()
|
|
|
|
}()
|
|
|
|
go func() {
|
2023-01-03 20:34:10 +02:00
|
|
|
_, _ = m.Float64ObservableUpDownCounter("AFUpDownCounter")
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
wg.Done()
|
|
|
|
}()
|
|
|
|
go func() {
|
2023-01-03 20:34:10 +02:00
|
|
|
_, _ = m.Float64ObservableGauge("AFGauge")
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
wg.Done()
|
|
|
|
}()
|
|
|
|
go func() {
|
2023-01-03 20:34:10 +02:00
|
|
|
_, _ = m.Int64ObservableCounter("AICounter")
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
wg.Done()
|
|
|
|
}()
|
|
|
|
go func() {
|
2023-01-03 20:34:10 +02:00
|
|
|
_, _ = m.Int64ObservableUpDownCounter("AIUpDownCounter")
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
wg.Done()
|
|
|
|
}()
|
|
|
|
go func() {
|
2023-01-03 20:34:10 +02:00
|
|
|
_, _ = m.Int64ObservableGauge("AIGauge")
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
wg.Done()
|
|
|
|
}()
|
|
|
|
go func() {
|
2023-01-03 20:34:10 +02:00
|
|
|
_, _ = m.Float64Counter("SFCounter")
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
wg.Done()
|
|
|
|
}()
|
|
|
|
go func() {
|
2023-01-03 20:34:10 +02:00
|
|
|
_, _ = m.Float64UpDownCounter("SFUpDownCounter")
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
wg.Done()
|
|
|
|
}()
|
|
|
|
go func() {
|
2023-01-03 20:34:10 +02:00
|
|
|
_, _ = m.Float64Histogram("SFHistogram")
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
wg.Done()
|
|
|
|
}()
|
|
|
|
go func() {
|
2023-01-03 20:34:10 +02:00
|
|
|
_, _ = m.Int64Counter("SICounter")
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
wg.Done()
|
|
|
|
}()
|
|
|
|
go func() {
|
2023-01-03 20:34:10 +02:00
|
|
|
_, _ = m.Int64UpDownCounter("SIUpDownCounter")
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
wg.Done()
|
|
|
|
}()
|
|
|
|
go func() {
|
2023-01-03 20:34:10 +02:00
|
|
|
_, _ = m.Int64Histogram("SIHistogram")
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
wg.Done()
|
|
|
|
}()
|
|
|
|
|
|
|
|
wg.Wait()
|
|
|
|
}
|
|
|
|
|
2023-01-08 17:53:07 +02:00
|
|
|
var emptyCallback metric.Callback = func(ctx context.Context) error { return nil }
|
|
|
|
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
// A Meter Should be able register Callbacks Concurrently.
|
|
|
|
func TestMeterCallbackCreationConcurrency(t *testing.T) {
|
|
|
|
wg := &sync.WaitGroup{}
|
|
|
|
wg.Add(2)
|
|
|
|
|
|
|
|
m := NewMeterProvider().Meter("callback-concurrency")
|
|
|
|
|
|
|
|
go func() {
|
2023-01-08 17:53:07 +02:00
|
|
|
_, _ = m.RegisterCallback([]instrument.Asynchronous{}, emptyCallback)
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
wg.Done()
|
|
|
|
}()
|
|
|
|
go func() {
|
2023-01-08 17:53:07 +02:00
|
|
|
_, _ = m.RegisterCallback([]instrument.Asynchronous{}, emptyCallback)
|
2022-12-16 22:02:42 +02:00
|
|
|
wg.Done()
|
|
|
|
}()
|
|
|
|
wg.Wait()
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestNoopCallbackUnregisterConcurrency(t *testing.T) {
|
|
|
|
m := NewMeterProvider().Meter("noop-unregister-concurrency")
|
2023-01-08 17:53:07 +02:00
|
|
|
reg, err := m.RegisterCallback(nil, emptyCallback)
|
2022-12-16 22:02:42 +02:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
|
|
|
wg := &sync.WaitGroup{}
|
|
|
|
wg.Add(2)
|
|
|
|
go func() {
|
|
|
|
_ = reg.Unregister()
|
|
|
|
wg.Done()
|
|
|
|
}()
|
|
|
|
go func() {
|
|
|
|
_ = reg.Unregister()
|
|
|
|
wg.Done()
|
|
|
|
}()
|
|
|
|
wg.Wait()
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestCallbackUnregisterConcurrency(t *testing.T) {
|
|
|
|
reader := NewManualReader()
|
|
|
|
provider := NewMeterProvider(WithReader(reader))
|
|
|
|
meter := provider.Meter("unregister-concurrency")
|
|
|
|
|
2023-01-03 20:34:10 +02:00
|
|
|
actr, err := meter.Float64ObservableCounter("counter")
|
2022-12-16 22:02:42 +02:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
2023-01-03 20:34:10 +02:00
|
|
|
ag, err := meter.Int64ObservableGauge("gauge")
|
2022-12-16 22:02:42 +02:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
|
|
|
i := []instrument.Asynchronous{actr}
|
2023-01-08 17:53:07 +02:00
|
|
|
regCtr, err := meter.RegisterCallback(i, emptyCallback)
|
2022-12-16 22:02:42 +02:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
|
|
|
i = []instrument.Asynchronous{ag}
|
2023-01-08 17:53:07 +02:00
|
|
|
regG, err := meter.RegisterCallback(i, emptyCallback)
|
2022-12-16 22:02:42 +02:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
|
|
|
wg := &sync.WaitGroup{}
|
|
|
|
wg.Add(2)
|
|
|
|
go func() {
|
|
|
|
_ = regCtr.Unregister()
|
|
|
|
_ = regG.Unregister()
|
|
|
|
wg.Done()
|
|
|
|
}()
|
|
|
|
go func() {
|
|
|
|
_ = regCtr.Unregister()
|
|
|
|
_ = regG.Unregister()
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
wg.Done()
|
|
|
|
}()
|
|
|
|
wg.Wait()
|
|
|
|
}
|
|
|
|
|
|
|
|
// Instruments should produce correct ResourceMetrics.
|
|
|
|
func TestMeterCreatesInstruments(t *testing.T) {
|
2023-01-06 19:20:49 +02:00
|
|
|
attrs := []attribute.KeyValue{attribute.String("name", "alice")}
|
2022-10-27 23:21:32 +02:00
|
|
|
seven := 7.0
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
testCases := []struct {
|
|
|
|
name string
|
|
|
|
fn func(*testing.T, metric.Meter)
|
|
|
|
want metricdata.Metrics
|
|
|
|
}{
|
|
|
|
{
|
2023-01-04 22:47:18 +02:00
|
|
|
name: "ObservableInt64Count",
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
fn: func(t *testing.T, m metric.Meter) {
|
2023-01-06 19:20:49 +02:00
|
|
|
cback := func(ctx context.Context, o instrument.Int64Observer) error {
|
|
|
|
o.Observe(ctx, 4, attrs...)
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
ctr, err := m.Int64ObservableCounter("aint", instrument.WithInt64Callback(cback))
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
assert.NoError(t, err)
|
2023-01-08 17:53:07 +02:00
|
|
|
_, err = m.RegisterCallback([]instrument.Asynchronous{ctr}, func(ctx context.Context) error {
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
ctr.Observe(ctx, 3)
|
2023-01-08 17:53:07 +02:00
|
|
|
return nil
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
})
|
|
|
|
assert.NoError(t, err)
|
|
|
|
|
|
|
|
// Observed outside of a callback, it should be ignored.
|
|
|
|
ctr.Observe(context.Background(), 19)
|
|
|
|
},
|
|
|
|
want: metricdata.Metrics{
|
|
|
|
Name: "aint",
|
|
|
|
Data: metricdata.Sum[int64]{
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
IsMonotonic: true,
|
|
|
|
DataPoints: []metricdata.DataPoint[int64]{
|
2023-01-06 19:20:49 +02:00
|
|
|
{Attributes: attribute.NewSet(attrs...), Value: 4},
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
{Value: 3},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2023-01-04 22:47:18 +02:00
|
|
|
name: "ObservableInt64UpDownCount",
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
fn: func(t *testing.T, m metric.Meter) {
|
2023-01-06 19:20:49 +02:00
|
|
|
cback := func(ctx context.Context, o instrument.Int64Observer) error {
|
|
|
|
o.Observe(ctx, 4, attrs...)
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
ctr, err := m.Int64ObservableUpDownCounter("aint", instrument.WithInt64Callback(cback))
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
assert.NoError(t, err)
|
2023-01-08 17:53:07 +02:00
|
|
|
_, err = m.RegisterCallback([]instrument.Asynchronous{ctr}, func(ctx context.Context) error {
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
ctr.Observe(ctx, 11)
|
2023-01-08 17:53:07 +02:00
|
|
|
return nil
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
})
|
|
|
|
assert.NoError(t, err)
|
|
|
|
|
|
|
|
// Observed outside of a callback, it should be ignored.
|
|
|
|
ctr.Observe(context.Background(), 19)
|
|
|
|
},
|
|
|
|
want: metricdata.Metrics{
|
|
|
|
Name: "aint",
|
|
|
|
Data: metricdata.Sum[int64]{
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
IsMonotonic: false,
|
|
|
|
DataPoints: []metricdata.DataPoint[int64]{
|
2023-01-06 19:20:49 +02:00
|
|
|
{Attributes: attribute.NewSet(attrs...), Value: 4},
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
{Value: 11},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2023-01-04 22:47:18 +02:00
|
|
|
name: "ObservableInt64Gauge",
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
fn: func(t *testing.T, m metric.Meter) {
|
2023-01-06 19:20:49 +02:00
|
|
|
cback := func(ctx context.Context, o instrument.Int64Observer) error {
|
|
|
|
o.Observe(ctx, 4, attrs...)
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
gauge, err := m.Int64ObservableGauge("agauge", instrument.WithInt64Callback(cback))
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
assert.NoError(t, err)
|
2023-01-08 17:53:07 +02:00
|
|
|
_, err = m.RegisterCallback([]instrument.Asynchronous{gauge}, func(ctx context.Context) error {
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
gauge.Observe(ctx, 11)
|
2023-01-08 17:53:07 +02:00
|
|
|
return nil
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
})
|
|
|
|
assert.NoError(t, err)
|
|
|
|
|
|
|
|
// Observed outside of a callback, it should be ignored.
|
|
|
|
gauge.Observe(context.Background(), 19)
|
|
|
|
},
|
|
|
|
want: metricdata.Metrics{
|
|
|
|
Name: "agauge",
|
|
|
|
Data: metricdata.Gauge[int64]{
|
|
|
|
DataPoints: []metricdata.DataPoint[int64]{
|
2023-01-06 19:20:49 +02:00
|
|
|
{Attributes: attribute.NewSet(attrs...), Value: 4},
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
{Value: 11},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2023-01-04 22:47:18 +02:00
|
|
|
name: "ObservableFloat64Count",
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
fn: func(t *testing.T, m metric.Meter) {
|
2023-01-06 19:20:49 +02:00
|
|
|
cback := func(ctx context.Context, o instrument.Float64Observer) error {
|
|
|
|
o.Observe(ctx, 4, attrs...)
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
ctr, err := m.Float64ObservableCounter("afloat", instrument.WithFloat64Callback(cback))
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
assert.NoError(t, err)
|
2023-01-08 17:53:07 +02:00
|
|
|
_, err = m.RegisterCallback([]instrument.Asynchronous{ctr}, func(ctx context.Context) error {
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
ctr.Observe(ctx, 3)
|
2023-01-08 17:53:07 +02:00
|
|
|
return nil
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
})
|
|
|
|
assert.NoError(t, err)
|
|
|
|
|
|
|
|
// Observed outside of a callback, it should be ignored.
|
|
|
|
ctr.Observe(context.Background(), 19)
|
|
|
|
},
|
|
|
|
want: metricdata.Metrics{
|
|
|
|
Name: "afloat",
|
|
|
|
Data: metricdata.Sum[float64]{
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
IsMonotonic: true,
|
|
|
|
DataPoints: []metricdata.DataPoint[float64]{
|
2023-01-06 19:20:49 +02:00
|
|
|
{Attributes: attribute.NewSet(attrs...), Value: 4},
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
{Value: 3},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2023-01-04 22:47:18 +02:00
|
|
|
name: "ObservableFloat64UpDownCount",
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
fn: func(t *testing.T, m metric.Meter) {
|
2023-01-06 19:20:49 +02:00
|
|
|
cback := func(ctx context.Context, o instrument.Float64Observer) error {
|
|
|
|
o.Observe(ctx, 4, attrs...)
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
ctr, err := m.Float64ObservableUpDownCounter("afloat", instrument.WithFloat64Callback(cback))
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
assert.NoError(t, err)
|
2023-01-08 17:53:07 +02:00
|
|
|
_, err = m.RegisterCallback([]instrument.Asynchronous{ctr}, func(ctx context.Context) error {
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
ctr.Observe(ctx, 11)
|
2023-01-08 17:53:07 +02:00
|
|
|
return nil
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
})
|
|
|
|
assert.NoError(t, err)
|
|
|
|
|
|
|
|
// Observed outside of a callback, it should be ignored.
|
|
|
|
ctr.Observe(context.Background(), 19)
|
|
|
|
},
|
|
|
|
want: metricdata.Metrics{
|
|
|
|
Name: "afloat",
|
|
|
|
Data: metricdata.Sum[float64]{
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
IsMonotonic: false,
|
|
|
|
DataPoints: []metricdata.DataPoint[float64]{
|
2023-01-06 19:20:49 +02:00
|
|
|
{Attributes: attribute.NewSet(attrs...), Value: 4},
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
{Value: 11},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2023-01-04 22:47:18 +02:00
|
|
|
name: "ObservableFloat64Gauge",
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
fn: func(t *testing.T, m metric.Meter) {
|
2023-01-06 19:20:49 +02:00
|
|
|
cback := func(ctx context.Context, o instrument.Float64Observer) error {
|
|
|
|
o.Observe(ctx, 4, attrs...)
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
gauge, err := m.Float64ObservableGauge("agauge", instrument.WithFloat64Callback(cback))
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
assert.NoError(t, err)
|
2023-01-08 17:53:07 +02:00
|
|
|
_, err = m.RegisterCallback([]instrument.Asynchronous{gauge}, func(ctx context.Context) error {
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
gauge.Observe(ctx, 11)
|
2023-01-08 17:53:07 +02:00
|
|
|
return nil
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
})
|
|
|
|
assert.NoError(t, err)
|
|
|
|
|
|
|
|
// Observed outside of a callback, it should be ignored.
|
|
|
|
gauge.Observe(context.Background(), 19)
|
|
|
|
},
|
|
|
|
want: metricdata.Metrics{
|
|
|
|
Name: "agauge",
|
|
|
|
Data: metricdata.Gauge[float64]{
|
|
|
|
DataPoints: []metricdata.DataPoint[float64]{
|
2023-01-06 19:20:49 +02:00
|
|
|
{Attributes: attribute.NewSet(attrs...), Value: 4},
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
{Value: 11},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
name: "SyncInt64Count",
|
|
|
|
fn: func(t *testing.T, m metric.Meter) {
|
2023-01-03 20:34:10 +02:00
|
|
|
ctr, err := m.Int64Counter("sint")
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
assert.NoError(t, err)
|
|
|
|
|
|
|
|
ctr.Add(context.Background(), 3)
|
|
|
|
},
|
|
|
|
want: metricdata.Metrics{
|
|
|
|
Name: "sint",
|
|
|
|
Data: metricdata.Sum[int64]{
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
IsMonotonic: true,
|
|
|
|
DataPoints: []metricdata.DataPoint[int64]{
|
|
|
|
{Value: 3},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "SyncInt64UpDownCount",
|
|
|
|
fn: func(t *testing.T, m metric.Meter) {
|
2023-01-03 20:34:10 +02:00
|
|
|
ctr, err := m.Int64UpDownCounter("sint")
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
assert.NoError(t, err)
|
|
|
|
|
|
|
|
ctr.Add(context.Background(), 11)
|
|
|
|
},
|
|
|
|
want: metricdata.Metrics{
|
|
|
|
Name: "sint",
|
|
|
|
Data: metricdata.Sum[int64]{
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
IsMonotonic: false,
|
|
|
|
DataPoints: []metricdata.DataPoint[int64]{
|
|
|
|
{Value: 11},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "SyncInt64Histogram",
|
|
|
|
fn: func(t *testing.T, m metric.Meter) {
|
2023-01-03 20:34:10 +02:00
|
|
|
gauge, err := m.Int64Histogram("histogram")
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
assert.NoError(t, err)
|
|
|
|
|
|
|
|
gauge.Record(context.Background(), 7)
|
|
|
|
},
|
|
|
|
want: metricdata.Metrics{
|
|
|
|
Name: "histogram",
|
|
|
|
Data: metricdata.Histogram{
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
DataPoints: []metricdata.HistogramDataPoint{
|
|
|
|
{
|
|
|
|
Attributes: attribute.Set{},
|
|
|
|
Count: 1,
|
2022-10-05 00:41:18 +02:00
|
|
|
Bounds: []float64{0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000},
|
|
|
|
BucketCounts: []uint64{0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
Min: &seven,
|
|
|
|
Max: &seven,
|
|
|
|
Sum: 7.0,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "SyncFloat64Count",
|
|
|
|
fn: func(t *testing.T, m metric.Meter) {
|
2023-01-03 20:34:10 +02:00
|
|
|
ctr, err := m.Float64Counter("sfloat")
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
assert.NoError(t, err)
|
|
|
|
|
|
|
|
ctr.Add(context.Background(), 3)
|
|
|
|
},
|
|
|
|
want: metricdata.Metrics{
|
|
|
|
Name: "sfloat",
|
|
|
|
Data: metricdata.Sum[float64]{
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
IsMonotonic: true,
|
|
|
|
DataPoints: []metricdata.DataPoint[float64]{
|
|
|
|
{Value: 3},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "SyncFloat64UpDownCount",
|
|
|
|
fn: func(t *testing.T, m metric.Meter) {
|
2023-01-03 20:34:10 +02:00
|
|
|
ctr, err := m.Float64UpDownCounter("sfloat")
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
assert.NoError(t, err)
|
|
|
|
|
|
|
|
ctr.Add(context.Background(), 11)
|
|
|
|
},
|
|
|
|
want: metricdata.Metrics{
|
|
|
|
Name: "sfloat",
|
|
|
|
Data: metricdata.Sum[float64]{
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
IsMonotonic: false,
|
|
|
|
DataPoints: []metricdata.DataPoint[float64]{
|
|
|
|
{Value: 11},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "SyncFloat64Histogram",
|
|
|
|
fn: func(t *testing.T, m metric.Meter) {
|
2023-01-03 20:34:10 +02:00
|
|
|
gauge, err := m.Float64Histogram("histogram")
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
assert.NoError(t, err)
|
|
|
|
|
|
|
|
gauge.Record(context.Background(), 7)
|
|
|
|
},
|
|
|
|
want: metricdata.Metrics{
|
|
|
|
Name: "histogram",
|
|
|
|
Data: metricdata.Histogram{
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
DataPoints: []metricdata.HistogramDataPoint{
|
|
|
|
{
|
|
|
|
Attributes: attribute.Set{},
|
|
|
|
Count: 1,
|
2022-10-05 00:41:18 +02:00
|
|
|
Bounds: []float64{0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000},
|
|
|
|
BucketCounts: []uint64{0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
Min: &seven,
|
|
|
|
Max: &seven,
|
|
|
|
Sum: 7.0,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
for _, tt := range testCases {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
rdr := NewManualReader()
|
|
|
|
m := NewMeterProvider(WithReader(rdr)).Meter("testInstruments")
|
|
|
|
|
|
|
|
tt.fn(t, m)
|
|
|
|
|
|
|
|
rm, err := rdr.Collect(context.Background())
|
|
|
|
assert.NoError(t, err)
|
|
|
|
|
|
|
|
require.Len(t, rm.ScopeMetrics, 1)
|
|
|
|
sm := rm.ScopeMetrics[0]
|
|
|
|
require.Len(t, sm.Metrics, 1)
|
|
|
|
got := sm.Metrics[0]
|
|
|
|
metricdatatest.AssertEqual(t, tt.want, got, metricdatatest.IgnoreTimestamp())
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestMetersProvideScope(t *testing.T) {
|
|
|
|
rdr := NewManualReader()
|
|
|
|
mp := NewMeterProvider(WithReader(rdr))
|
|
|
|
|
|
|
|
m1 := mp.Meter("scope1")
|
2023-01-03 20:34:10 +02:00
|
|
|
ctr1, err := m1.Float64ObservableCounter("ctr1")
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
assert.NoError(t, err)
|
2023-01-08 17:53:07 +02:00
|
|
|
_, err = m1.RegisterCallback([]instrument.Asynchronous{ctr1}, func(ctx context.Context) error {
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
ctr1.Observe(ctx, 5)
|
2023-01-08 17:53:07 +02:00
|
|
|
return nil
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
})
|
|
|
|
assert.NoError(t, err)
|
|
|
|
|
|
|
|
m2 := mp.Meter("scope2")
|
2023-01-03 20:34:10 +02:00
|
|
|
ctr2, err := m2.Int64ObservableCounter("ctr2")
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
assert.NoError(t, err)
|
2023-01-08 17:53:07 +02:00
|
|
|
_, err = m1.RegisterCallback([]instrument.Asynchronous{ctr2}, func(ctx context.Context) error {
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
ctr2.Observe(ctx, 7)
|
2023-01-08 17:53:07 +02:00
|
|
|
return nil
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
})
|
|
|
|
assert.NoError(t, err)
|
|
|
|
|
|
|
|
want := metricdata.ResourceMetrics{
|
2022-09-22 18:18:18 +02:00
|
|
|
Resource: resource.Default(),
|
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Remove the number and aggregator from the metric SDK (#2840)
* Add MeterProvider/meter structure to new SDK (#2822)
* Remove prometheus example code
* Remove prometheus exporter code
* Remove stdoutmetric code
* Remove sdk/metric/* packages
* Remove opencensus example code
* Remove otlpmetric exporter code
* Remove OpenCensus bridge code
* go mod tidy
* Remove empty modules
* Add MeterProvider/meter structure to new SDK
* Add vanity imports
* go mod tidy
* Add MeterProvider Flush/Shutdown required by spec
* Cast nil ptr instead of alloc for comp time check
* Apply suggestions from code review
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Apply suggested Shutdown comment
* Apply fixes from feedback
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add sdk/metric/view structure (#2838)
* Add sdk/metric/view package structure
* Vanity import
* Define the reader interface, and create a manual reader (#2885)
* Add the manual reader to the sdk.
* Incoperate feedback from PR.
* additional PR comments
* Fix lint
* Fixes for PR.
* Unexport ManualReader
fix a few comments
* Refactor reader testing into a harness (#2910)
* Refactor reader testing into a harness
* Run lint
* Removed merge leftover
* Use opentracing bridge from main
* go mod tidy
* crosslink
* Remove Prometheus exporter from README for now
* Run make with new tool set
* Replace testReaderHarness with testify suite (#2915)
* Add the periodic reader (#2909)
* Add the metric.Exporter interface
* Move the reader errors to reader.go
* Update Reader.Collect docs
Remove TODO being addressed in this PR and restate purpose of method.
* Initial draft of the periodic reader
* Refer to correct config in periodic reader opts
* Refactor reader testing into a harness
* Move wait group handling out of run
* Refactor ticker creation to allow testing
* Honor export timeout in run
* Fix wait group wait bug
* Add periodic reader tests
* Fix lint
* Update periodic reader comments
* Add concurrency test for readers
* Simplify the ticker stop deferral
* Only register once
* Restrict build of metric sdk to Go>1.16
* Clean up ShutdownBeforeRegister test
* Test duplicate Reader registration (#2914)
The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.
* Add WithReader and WithResource Options (#2905)
* Add WithReader and WithResource Options
* Run lint
* Update WithReader fn signature based on feedback
* crosslink
* Remove zero-len check in unify
* Restrict build to Go > 1.16
* Add bench test for reader collect methods (#2922)
* Unify reader implementations (#2923)
* Unify reader implementations
Use an atomic.Value to manage concurrency without a lock.
* Lint
* Merge main into new sdk main (#2925)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Make lint
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add view to metrics. (#2926)
* WIP views public
* Add attribute filters and comments.
* Fixes for lint
* Address comments
* Fix lint
* Changed view matching to expand end
Removed the dscriptor, it was moved in previous patch
* change wildcards into regex
* Update comments
* address comments.
* Address more PR comments
* renamed WithDescription to WithSetDescription.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Implement MeterProvider's Meter method (#2945)
* Implement stubbed meter create method
* Rename return value to avoid comment
* Encapsulate meterRegistry tests with identifying name
* Run lint fix
* Comment meterRegistry being concurrent safe
* Remove ordered meter tracking in the meterRegistry
* Test range completeness instead of order
* Remove provider field from meter
* Initialize MeterProvider readers field for new (#2948)
* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)
* Introduce Temporality and InstrumentKind
Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface. And New options are created to
configure the temporality selector.
* Addresses comments, and adds tests.
* Fix addition PR comment
* Add aggregation package and reader/view options (#2958)
* Add aggregation pkg and options
* Update documentation for the aggregation pkg
* Test Aggregation.Err
* Fix aggregation pkg comment
* Add WithAggregation comment
* Add default aggregation
* Rename WithAggregation and add AggregationSelector
* Fix DefaultAggregationSelector use and decl
* Replace Aggregation struct with iface
* Add Copy method to hist and fix Err method
* Additional test for monotonic bounds
* Add aggregation method to Reader
* Use AggregationSelector instead of inline func type
* Switch RecordMinMax to NoMinMax
* Deep copy and validate in options
* Test the DefaultAggregationSelector
* nolint for import-shadow of method
* Fix Default aggregation comment
* Test the explicit bucket histogram deep copy
* Update temporality selector option (#2967)
Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.
* Minor NewMeterProvider and producer docs fix (#2983)
* Add internal package structure for aggregation (#2954)
* Add the aggtor package
* Restrict to Go 1.18
* Add missing build block to view_test.go
* Comment Aggregator iface
* Use Go 1.18 as the default ci version
* Update Aggregator iface from feedback
* Accept hist conf
* Flatten aggtor into just internal
* Add Cycler interface
Separate the duties of aggregation and maintaining state across
aggregation periods.
* Remove build flags for doc.go
* Clarify Cycler documentation
* Remove aggregation fold logic
* Rename Number to Atomic
* Add tests for Atomic impls
* Remove unneeded Atomic implementation
Add back when filling in structures.
* Fix article in Float64 docs
* Remove Atomic
This is an implementation detail.
* Add aggregator_example_test
* Fix hist example
* Add issue numbers to all TODO and FIXME
* Remove zero parameter comment
* Combine the cycler into the aggregators
* Remove the drop aggregator
* Fix lint
* Use attribute.Set instead of ptr to it
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Merge main into new_sdk/main (#2996)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix merge of CHANGELOG.md
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
* Add structure to the export data. (#2961)
* Add structure to the export data.
* Fix comments.
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments.
* Updated optional historgram parameters.
* Address PR comments.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use export.Aggregation instead of internal.Aggregation (#3007)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data (#3012)
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Change Instrument Library to Instrument Scope (#3016)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move temporality to export/temporality (#3017)
* move temporality to export/temporality
* fix lint errors
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)
* fix unrelated changes
* fix quote code
* fix format
* rebase pr
* rebase pr
* change usage of export to metricdata
* Add metricdatatest package (#3025)
* Use export.Aggregation instead of internal
* Return an export.Aggregation instead of a slice
* Use attribute Sets instead of KeyValues for export data
Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.
Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.
* Add export data type comparison testing API
* Add Aggregation and Value comparison funcs
* Move export testing to own pkg
* Move exporttest to metricdatatest
* Add licenses headers to files missing them
* Use metricdata instead of export
Fix merge of new_sdk/main
* Rename exporttest pkg to metricdatatest
* Fix spelling errors
* Fix lint issues
* Use testing pkg to error directly
Include Helper() method calls to correct the call-stack.
* Fix CompareAggregations
Set equal to true by default
* Generalize assertions and unexport equal checks
* Abstract assert tests
* Rename all exp var to r
* Test AssertAggregationsEqual
* Comment why Value and Aggregation are separate
* Test AssertValuesEqual
* Revert changes to metricdata/temporality.go
* Expand pkg doc sentence
* Add license header to assertion.go
* Update assertion docs
* Consolidate comparisons funcs into one file
* Consolidate and fix docs
* Consolidate assertion.go
* Consolidate comparisons.go
* make lint
* Test with relatively static times
* Update sdk/metric/metricdata/metricdatatest/comparisons.go
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Drop equal return from comparison funcs
* Refactor AssertEqual
* Remove reasN from testDatatype func params
* Consolidate AssertEqual type conversions
* Fix assertion error message
* Add assertion failure tests
* Remove unneeded strings join
* Make comment include a possessive
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Adds a pipeline for creating reader's output (#3026)
* Adds a pipeline for creating reader's output
* fix metricdata move
* fix lint
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Address PR comments
* Added resource test
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Declare Sum and DataPoints type in pipeline_test
* Add MatchInstrumentKind filter for Views. (#3037)
* Move InstrumentKind to view, Add view filter
* remove TODO
* Add the Option function, fix lint
* use local var over 0
* Fix missing undefinedInstrumnet
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Change View Attribute Filter to detect if not set. (#3039)
* Change View Attribute Filter to detect if not set.
* Fix PR comments.
* Rework test for no filter logic.
* Add implementation of last-value aggregator (#3008)
* Add last-value aggregator
* Add test of last-value reset of unseen attrs
* Add benchmark
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Fix tests
* Remove unused test increment values
* View.New() miss InstrumentKind check (#3043)
Signed-off-by: liupengfei <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add delta/cumulative histogram implementation (#3045)
* Add delta/cumulative histogram implementation
* Add histogram unit tests
* Fix histValues Aggregate
Store the new buckets value back to the values map.
Ensure min/max are measured values, not zero values.
* Fix lint
* Add benchmarks
* Test histograms internal functionality
* Fix lint
* Add TODO to look at memory use for cumu hist
* Update sdk/metric/internal/histogram.go
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* use TemporalitySelector (#3050)
Signed-off-by: Petrie <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add implementation of Sum aggregators (#3000)
* Implement the sum aggregators
* Add unit tests for delta/cumulative sums
* Add benchmarks
* Merge sum tests into one
* Remove unused start time from cumulative sum
* Refactor benchmark tests
Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.
* goimports
* Move timestamp out of lock
* Refactor testing
* Fix spelling mistake
* Name param of expectFunc
* Reset delta sum to zero instead of delete
* Revert to deleting unused attr sets
* Refactor testing to allow use across other aggs
* Add TODO to bound cumulative sum mem usage
* Fix misspelling
* Unify aggregator benchmark code in aggregator_test
* Use generic DataPoint value
* Fix assertion_fail_test.go
* Use generic metricdata types
* Fix tests
* Fix benchmarks
* Fix lint
* Update sum documentation
* Remove leftover encapsulating test run
* Use t.Cleanup to mock time
* Consolidate expecter logic into funcs
* Move errNegVal closer to use
* Run the agg test
* Add tests for monotonic sum Aggregate err
* Run make lint
* Make monotonic an arg of creation funcs
* Remove Aggregate monotonic validation
* Rename sum to valueMap
The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.
* Adds a filter Aggregator. (#3040)
* Adds a filter Aggregator.
* Add lock and tests
* Add Concurrency tests
* fix lint errors
* Add memory constrained todo.
* Update filter comment.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add back the stdoutmetric exporter (#3057)
* PoC stdoutmetric exporter
* Use stringer to generate String for Temporality
* Add vanity imports
* Update Temporality string expected output
* Do not return error from newConfig
* Add shutdown unit tests
* Fix spelling error
* Unify testing of ctx errors and test ForceFlush
* Add unit test for Export handle of ctx errs
* Clarify documentation about alt OTLP exporter
* Remove unused ErrUnrecognized
A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.
* Lint exporter_test.go
* Refactor example_test.go removing FIXME
* Add test for Export shutdown err
* Add a discard encoder for testing
* Acknowledged error is returned from Shutdown
* Remove unexpected SchemaURL from stdouttrace test
* Remove unneeded *testing.T arg from testEncoderOption
* Fix the location of now
* Revise and edit docs
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Remove stale TODO from metricdata/data.go (#3064)
* Merge main into new_sdk/main (#3082)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Adds the option to ignore timestamps in metric data tests. (#3076)
* Adds the option to ignore timestamps in metric data tests
* use config over bool
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Adds a pipelineRegistry to manage creating aggregators. (#3044)
* Adds a pipelineRegistry to manage creating aggregators.
* Made pipeline generic
* Add aggregation filter to the registry.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Remove stale TODO (#3083)
The aggregation transform function was added in #2958.
* Add back the otlpmetric transforms (#3065)
* Add otlpmetric transforms
* Split aggregation transforms to own file
* Rename Iterator to AttrIter
* Update pkg docs
These are internal docs use developer based language.
* Document all exported funcs
* Unify metricdata type transforms into one file
* Rename metrics.go to metricdata.go
* Copy back attribute tests
* Copy back in Iterator test
* Refactor attribute tests
* Add tests for metricdata transforms
* Add multiErr support for digestible transform errs
* Test transform errors
* go mod tidy
* Use key field
* goimported
* gofmt-ed
* Fix error documentation
* go mod tidy
* Changes instruments uniqueness in pipeline. (#3071)
* Changes instruments uniquness in pipeline.
* Fix lint
* Update sdk/metric/pipeline.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)
* Restore otlpmetric/otlpconfig from main
* Rename otlpconfig to oconf
* Remove the empty envconfig_test.go
* Update import of otlpconfig in oconf_test
* go mod tidy
* Run make
* add internal OpenCensus metric translation library (#3099)
* reintroduce opencensus trace bridge (#3098)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Document the sdk/metric/view package (#3086)
* Add package documentation for sdk/metric/view
* Refer to views not configs in WithReader docs
* Fix vanity url for view_test.go
* Add example tests for view options
* Add package example
* Fix view type docs
* Remove build constraint for doc.go
* Fix lint
* Adds async instruments and providers. (#3084)
* Adds instrument providers and instruments.
* Don't return nil instrument, return with error
* removed sync
* Added a number of tests.
Signed-off-by: GitHub <noreply@github.com>
* Address PR comments
* fix error messages
* fixes typo in test name
Signed-off-by: GitHub <noreply@github.com>
* Fix lint issues
* moved the testCallback into the TestMeterCreateInstrument
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Merge branch 'main' into new_sdk/main (#3111)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add otlpmetric exporter (#3089)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Merge transform and upload errors
* Fix ineffectual increment
* Make pipelineRegistry non-generic (#3115)
* Make pipelineRegistry non-generic
* Add Synchronous instruments (#3124)
* Add Synchronous instruments
* remove duplicate code in instrument
* Fixes to Histogram comments
* Add back the otlpmetricgrpc exporter (#3094)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add the otlpmetricgrpc Go module
* Restore otlpmetricgrpc from main
* Remove integration testing from otlpmetricgrpc
* Fix import of otlpconfig to oconf
* Update client
Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.
* Update otlpmetricgrpc New functions
Remove NewUnstarted and only export New.
* Remove unneeded client sync
The exporter handle the synchronization of client method calls.
* Update example_test.go
* Update client_unit_test.go
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Add package doc
* Unify exporter.go and doc.go into client.go
* Unexport NewClient
* Correct option documentation
* Add env config documentation
* go mod tidy
* Restrict build to Go 1.18
* Update client.go
Fix copied UploadMetrics documentation.
* Run make
* Close client conn even if context deadline reached
* Add sdk/metric Go pkg docs and example (#3139)
* Add sdk/metric Go pkg docs
* Add example_test.go
* Add Go 1.18 build guard to example_test.go
* Merge main into new_sdk/main (#3141)
* Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
* Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17
* Update readme and changelog
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.
This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* docs: fix typo (#2935)
* add timeout to grpc connection in otel-collector example (#2939)
* Closes: #2951 (#2952)
This PR updates the example listed in the getting started doc
so that it will compile without error. It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go
Signed-off-by: Brad Topol <btopol@us.ibm.com>
* fix data-model link (#2955)
* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)
* Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope
* Use type alias, not definition
* Add a changelog entry
* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)
* docs(website_docs): fix toc
* docs(website_docs): fix toc
* update exporting_data.md for rerun check-links
* update exporting_data.md for rerun check-links
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update getting-started.md (#2984)
grammar edit for line 175 of readme
* fix typo (#2986)
* fix typo
* spell fix
* typo fix (#2991)
* added traces.txt to gitignore for fib (#2993)
* Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope
* Add PR number to changelog
* Don't change signatures in stable modules
* Revert some changes
* Rename internal struct names
* A bit more renaming
* Update sdk/trace/span.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update based on feedback
* Revert change
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Feat/bridge support text map (#2911)
* feat: support TextMap
* doc: add comment
* test: support for ot.TextMap
* Retrieve lost code due to merge
* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders
* go mod tidy
* Optimized code style, add changelog
* doc: Restore comments
* wip: add test cases
* test: fix args error
* delete empty line
* Fix syntax and changelog errors
* Fix formatting errors
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a release template (#2863)
* Add a release template
* Update the about field
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Fix linting Issues
* Add ignore for template link
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add workflow to automate bundling dependabot PRs (#2997)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update go-build-tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Prepare stable-v1 for version v1.8.0
* Prepare experimental-metrics for version v0.31.0
* Prepare bridge for version v0.31.0
* `make go-mod-tidy` should use `-compat=1.17` now
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter
* move counter annotation up
* fix syncFloat64 to syncInt64
* fix syncFloat64 to syncInt64
* fix go-lint err
* Add semconv/v1.11.0 (#3009)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0
* Update all semconv use to v1.12.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add http.method attribute to http server metric (#3018)
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
* Add tests and fix opentracing bridge defer warning (#3029)
* add tests and fix opentracing bridge defer warning
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update bridge/opentracing/bridge_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Introduce "split" metric schema transformation (#2999)
This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.
An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617
This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653
This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.
* Release v1.9.0 (#3052)
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.9.0
* Prepare experimental-schema for version v0.0.3
* Update changelog for release
* Replace ioutil with io and os (#3058)
* Make several vars into consts (#3068)
* Add support for Go 1.19 (#3077)
* Add support for Go 1.19
* Update CHANGELOG.md
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Sam Xie <sam@samxie.me>
* Update compatibility documentation (#3079)
Remove 3 month timeline for backwards support of old versions of Go.
* Fix `opentracing.Bridge` where it miss identifying the spanKind (#3096)
* Fix opentracing.Bridge where it was not identifying the spanKinf correctly
* fix test
* changelog
* Keeping backward comppatibillity
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* replace `required` by `requirementlevel` (#3103)
* Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries
* make exponent and logarithm more symmetric
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix sdk/instrumentation pkg docs (#3130)
* Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API
* Add Attributes field to instrumentation Scope
* Use scope attributes for new Tracer
* Fix stdouttrace expected test output
* Allow unexported Set fields in sdk/trace test
* Export instrumentation scope attrs in OTLP
* Add changes to the changelog
* Fix imports with make lint
* Add unit tests for WithScopeAttributes
* Fix English in Scope documentation
* Add WithScopeAttributes MeterOption to metric API package (#3132)
* Add WithScopeAttributes MeterOption to metric pkg
* Add MeterConfig unit tests
* Add changes to changelog
* Fix import linting
* Update MeterProvider documentation
Include information about how to use WithScopeAttributes.
* Refactor TracerProvider documentation (#3133)
* Refactor TracerProvider documentation
* Fix English article
* Grammar fixes
* consistency-of: Changed signal names for website docs (#3137)
* Shut down all processors even on error (#3091)
* Fix stdoutmetric example test
The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
* Remove empty metrictest pkg (#3148)
* Add exporters/otlp/otlpmetric/internal/otest (#3125)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Restore otlpmetrictest from main
* Rename otlpmetrictest to otest
* Remove data.go
The functions and types it contains are no longer relevant to the SDK.
* Update client context error tests
Remove multiple shutdown tests. The Client interface states this should
never happen.
* Remove collector.go and otlptest.go
* Expand client tests with ctx and force-flush
* Add UploadMetrics tests
* Test the tests with a trivial client
* Condense all to client.go
* Example of how to run RunClientTests
* Add client integration testing
* Add GRPCCollector
* Remove GRPCCollector to limit scope of PR
* Add back the otlpmetrichttp exporter (#3097)
* Add otlpmetric package doc
* Add Client interface
* Add the Exporter
Have the Exporter ensure synchronous access to all client methods.
* Add race detection test for Exporter
* Expand New godocs
* Fix lint
* Add back the otlpmetrichttp pkg from main
* Restrict to Go 1.18 and above
* Remove integration testing
* Rename client_unit_test.go to client_test.go
* Rename options.go to config.go
* Remove the NewUnstarted func
* Remove Start method from client
* Add no-op ForceFlush method to client
* Update otlpconfig pkg name to oconf
* Rename Stop method to Shutdown
Match the otlpmetric.Client interface.
* Update creation functions to compile
* Remove name field from client
* Remove sync of methods from client
This is handled by the exporter.
* Remove unused generalCfg field from client
* Replace cfg client field with used conf vals
* Use a http request instead of url/header fields
* Remove NewClient and move New into client.go
* Rename client.client field to client.httpClient
* Update client tests
Remove test of a retry config and add functional tests of the client
methods honoring a context.
* Remove deprecated WithMaxAttempts and WithBackoff
* Update option docs
Include info on envvars.
* Fix lint
* Fix lint errors
* Revert New to accept a context
* Add example test
* Update pkg docs
* go mod tidy
* Use url.URL to form HTTP request URL
* Remove stale TODO in sdk/view (#3149)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Use unique metric testing data in reader_test (#3151)
Address unresolved TODO.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add new metric SDK changes to changelog (#3150)
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add integration and config testing to otlpmetricgrpc (#3126)
* Add the GRPCCollector to otest
* Use otest to test otlpmetricgrpc Client
* Add WithHeaders and WithTimeout tests
* Add integration and config testing to otlpmetrichttp (#3155)
* Add HTTPCollector to otest
* Add integration testing for otlpmetrichttp
* Fix NewHTTPCollector docs
* Add config tests
* Fix lint
* Add WithURLPath test
* Add WithTLSClientConfig test
* Ignore depguard for crypto/x509/pkix
This is a testing package that uses the package to generate a weak
testing TLS certificate.
* Add Prometheus exporter code (#3135)
* Add Prometheus exporter example (#3168)
* Add back prom exporter to README.md
* Fix removal changes from #3154 in API
* Update CHANGELOG with PR number
Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-16 03:41:24 +02:00
|
|
|
ScopeMetrics: []metricdata.ScopeMetrics{
|
|
|
|
{
|
|
|
|
Scope: instrumentation.Scope{
|
|
|
|
Name: "scope1",
|
|
|
|
},
|
|
|
|
Metrics: []metricdata.Metrics{
|
|
|
|
{
|
|
|
|
Name: "ctr1",
|
|
|
|
Data: metricdata.Sum[float64]{
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
IsMonotonic: true,
|
|
|
|
DataPoints: []metricdata.DataPoint[float64]{
|
|
|
|
{
|
|
|
|
Value: 5,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Scope: instrumentation.Scope{
|
|
|
|
Name: "scope2",
|
|
|
|
},
|
|
|
|
Metrics: []metricdata.Metrics{
|
|
|
|
{
|
|
|
|
Name: "ctr2",
|
|
|
|
Data: metricdata.Sum[int64]{
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
IsMonotonic: true,
|
|
|
|
DataPoints: []metricdata.DataPoint[int64]{
|
|
|
|
{
|
|
|
|
Value: 7,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
got, err := rdr.Collect(context.Background())
|
|
|
|
assert.NoError(t, err)
|
|
|
|
metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp())
|
|
|
|
}
|
2022-11-08 17:45:23 +02:00
|
|
|
|
2022-12-16 22:02:42 +02:00
|
|
|
func TestUnregisterUnregisters(t *testing.T) {
|
|
|
|
r := NewManualReader()
|
|
|
|
mp := NewMeterProvider(WithReader(r))
|
|
|
|
m := mp.Meter("TestUnregisterUnregisters")
|
|
|
|
|
2023-01-03 20:34:10 +02:00
|
|
|
int64Counter, err := m.Int64ObservableCounter("int64.counter")
|
2022-12-16 22:02:42 +02:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
2023-01-03 20:34:10 +02:00
|
|
|
int64UpDownCounter, err := m.Int64ObservableUpDownCounter("int64.up_down_counter")
|
2022-12-16 22:02:42 +02:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
2023-01-03 20:34:10 +02:00
|
|
|
int64Gauge, err := m.Int64ObservableGauge("int64.gauge")
|
2022-12-16 22:02:42 +02:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
2023-01-03 20:34:10 +02:00
|
|
|
floag64Counter, err := m.Float64ObservableCounter("floag64.counter")
|
2022-12-16 22:02:42 +02:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
2023-01-03 20:34:10 +02:00
|
|
|
floag64UpDownCounter, err := m.Float64ObservableUpDownCounter("floag64.up_down_counter")
|
2022-12-16 22:02:42 +02:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
2023-01-03 20:34:10 +02:00
|
|
|
floag64Gauge, err := m.Float64ObservableGauge("floag64.gauge")
|
2022-12-16 22:02:42 +02:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
|
|
|
var called bool
|
|
|
|
reg, err := m.RegisterCallback([]instrument.Asynchronous{
|
|
|
|
int64Counter,
|
|
|
|
int64UpDownCounter,
|
|
|
|
int64Gauge,
|
|
|
|
floag64Counter,
|
|
|
|
floag64UpDownCounter,
|
|
|
|
floag64Gauge,
|
2023-01-08 17:53:07 +02:00
|
|
|
}, func(context.Context) error {
|
|
|
|
called = true
|
|
|
|
return nil
|
|
|
|
})
|
2022-12-16 22:02:42 +02:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
|
|
|
ctx := context.Background()
|
|
|
|
_, err = r.Collect(ctx)
|
|
|
|
require.NoError(t, err)
|
|
|
|
assert.True(t, called, "callback not called for registered callback")
|
|
|
|
|
|
|
|
called = false
|
|
|
|
require.NoError(t, reg.Unregister(), "unregister")
|
|
|
|
|
|
|
|
_, err = r.Collect(ctx)
|
|
|
|
require.NoError(t, err)
|
|
|
|
assert.False(t, called, "callback called for unregistered callback")
|
|
|
|
}
|
|
|
|
|
2022-11-11 19:10:59 +02:00
|
|
|
func TestRegisterCallbackDropAggregations(t *testing.T) {
|
2022-11-19 19:05:20 +02:00
|
|
|
aggFn := func(InstrumentKind) aggregation.Aggregation {
|
2022-11-11 19:10:59 +02:00
|
|
|
return aggregation.Drop{}
|
|
|
|
}
|
|
|
|
r := NewManualReader(WithAggregationSelector(aggFn))
|
|
|
|
mp := NewMeterProvider(WithReader(r))
|
|
|
|
m := mp.Meter("testRegisterCallbackDropAggregations")
|
|
|
|
|
2023-01-03 20:34:10 +02:00
|
|
|
int64Counter, err := m.Int64ObservableCounter("int64.counter")
|
2022-11-11 19:10:59 +02:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
2023-01-03 20:34:10 +02:00
|
|
|
int64UpDownCounter, err := m.Int64ObservableUpDownCounter("int64.up_down_counter")
|
2022-11-11 19:10:59 +02:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
2023-01-03 20:34:10 +02:00
|
|
|
int64Gauge, err := m.Int64ObservableGauge("int64.gauge")
|
2022-11-11 19:10:59 +02:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
2023-01-03 20:34:10 +02:00
|
|
|
floag64Counter, err := m.Float64ObservableCounter("floag64.counter")
|
2022-11-11 19:10:59 +02:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
2023-01-03 20:34:10 +02:00
|
|
|
floag64UpDownCounter, err := m.Float64ObservableUpDownCounter("floag64.up_down_counter")
|
2022-11-11 19:10:59 +02:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
2023-01-03 20:34:10 +02:00
|
|
|
floag64Gauge, err := m.Float64ObservableGauge("floag64.gauge")
|
2022-11-11 19:10:59 +02:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
|
|
|
var called bool
|
2022-12-16 22:02:42 +02:00
|
|
|
_, err = m.RegisterCallback([]instrument.Asynchronous{
|
2022-11-11 19:10:59 +02:00
|
|
|
int64Counter,
|
|
|
|
int64UpDownCounter,
|
|
|
|
int64Gauge,
|
|
|
|
floag64Counter,
|
|
|
|
floag64UpDownCounter,
|
|
|
|
floag64Gauge,
|
2023-01-08 17:53:07 +02:00
|
|
|
}, func(context.Context) error {
|
|
|
|
called = true
|
|
|
|
return nil
|
|
|
|
})
|
2022-12-16 22:02:42 +02:00
|
|
|
require.NoError(t, err)
|
2022-11-11 19:10:59 +02:00
|
|
|
|
|
|
|
data, err := r.Collect(context.Background())
|
|
|
|
require.NoError(t, err)
|
|
|
|
|
|
|
|
assert.False(t, called, "callback called for all drop instruments")
|
|
|
|
assert.Len(t, data.ScopeMetrics, 0, "metrics exported for drop instruments")
|
|
|
|
}
|
|
|
|
|
2022-11-08 17:45:23 +02:00
|
|
|
func TestAttributeFilter(t *testing.T) {
|
|
|
|
one := 1.0
|
|
|
|
two := 2.0
|
|
|
|
testcases := []struct {
|
|
|
|
name string
|
|
|
|
register func(t *testing.T, mtr metric.Meter) error
|
|
|
|
wantMetric metricdata.Metrics
|
|
|
|
}{
|
|
|
|
{
|
2023-01-04 22:47:18 +02:00
|
|
|
name: "ObservableFloat64Counter",
|
2022-11-08 17:45:23 +02:00
|
|
|
register: func(t *testing.T, mtr metric.Meter) error {
|
2023-01-03 20:34:10 +02:00
|
|
|
ctr, err := mtr.Float64ObservableCounter("afcounter")
|
2022-11-08 17:45:23 +02:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2023-01-08 17:53:07 +02:00
|
|
|
_, err = mtr.RegisterCallback([]instrument.Asynchronous{ctr}, func(ctx context.Context) error {
|
2022-11-08 17:45:23 +02:00
|
|
|
ctr.Observe(ctx, 1.0, attribute.String("foo", "bar"), attribute.Int("version", 1))
|
|
|
|
ctr.Observe(ctx, 2.0, attribute.String("foo", "bar"), attribute.Int("version", 2))
|
2023-01-08 17:53:07 +02:00
|
|
|
return nil
|
2022-11-08 17:45:23 +02:00
|
|
|
})
|
2022-12-16 22:02:42 +02:00
|
|
|
return err
|
2022-11-08 17:45:23 +02:00
|
|
|
},
|
|
|
|
wantMetric: metricdata.Metrics{
|
|
|
|
Name: "afcounter",
|
|
|
|
Data: metricdata.Sum[float64]{
|
|
|
|
DataPoints: []metricdata.DataPoint[float64]{
|
|
|
|
{
|
|
|
|
Attributes: attribute.NewSet(attribute.String("foo", "bar")),
|
|
|
|
Value: 2.0, // TODO (#3439): This should be 3.0.
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
IsMonotonic: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2023-01-04 22:47:18 +02:00
|
|
|
name: "ObservableFloat64UpDownCounter",
|
2022-11-08 17:45:23 +02:00
|
|
|
register: func(t *testing.T, mtr metric.Meter) error {
|
2023-01-03 20:34:10 +02:00
|
|
|
ctr, err := mtr.Float64ObservableUpDownCounter("afupdowncounter")
|
2022-11-08 17:45:23 +02:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2023-01-08 17:53:07 +02:00
|
|
|
_, err = mtr.RegisterCallback([]instrument.Asynchronous{ctr}, func(ctx context.Context) error {
|
2022-11-08 17:45:23 +02:00
|
|
|
ctr.Observe(ctx, 1.0, attribute.String("foo", "bar"), attribute.Int("version", 1))
|
|
|
|
ctr.Observe(ctx, 2.0, attribute.String("foo", "bar"), attribute.Int("version", 2))
|
2023-01-08 17:53:07 +02:00
|
|
|
return nil
|
2022-11-08 17:45:23 +02:00
|
|
|
})
|
2022-12-16 22:02:42 +02:00
|
|
|
return err
|
2022-11-08 17:45:23 +02:00
|
|
|
},
|
|
|
|
wantMetric: metricdata.Metrics{
|
|
|
|
Name: "afupdowncounter",
|
|
|
|
Data: metricdata.Sum[float64]{
|
|
|
|
DataPoints: []metricdata.DataPoint[float64]{
|
|
|
|
{
|
|
|
|
Attributes: attribute.NewSet(attribute.String("foo", "bar")),
|
|
|
|
Value: 2.0, // TODO (#3439): This should be 3.0.
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
IsMonotonic: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2023-01-04 22:47:18 +02:00
|
|
|
name: "ObservableFloat64Gauge",
|
2022-11-08 17:45:23 +02:00
|
|
|
register: func(t *testing.T, mtr metric.Meter) error {
|
2023-01-03 20:34:10 +02:00
|
|
|
ctr, err := mtr.Float64ObservableGauge("afgauge")
|
2022-11-08 17:45:23 +02:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2023-01-08 17:53:07 +02:00
|
|
|
_, err = mtr.RegisterCallback([]instrument.Asynchronous{ctr}, func(ctx context.Context) error {
|
2022-11-08 17:45:23 +02:00
|
|
|
ctr.Observe(ctx, 1.0, attribute.String("foo", "bar"), attribute.Int("version", 1))
|
|
|
|
ctr.Observe(ctx, 2.0, attribute.String("foo", "bar"), attribute.Int("version", 2))
|
2023-01-08 17:53:07 +02:00
|
|
|
return nil
|
2022-11-08 17:45:23 +02:00
|
|
|
})
|
2022-12-16 22:02:42 +02:00
|
|
|
return err
|
2022-11-08 17:45:23 +02:00
|
|
|
},
|
|
|
|
wantMetric: metricdata.Metrics{
|
|
|
|
Name: "afgauge",
|
|
|
|
Data: metricdata.Gauge[float64]{
|
|
|
|
DataPoints: []metricdata.DataPoint[float64]{
|
|
|
|
{
|
|
|
|
Attributes: attribute.NewSet(attribute.String("foo", "bar")),
|
|
|
|
Value: 2.0,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2023-01-04 22:47:18 +02:00
|
|
|
name: "ObservableInt64Counter",
|
2022-11-08 17:45:23 +02:00
|
|
|
register: func(t *testing.T, mtr metric.Meter) error {
|
2023-01-03 20:34:10 +02:00
|
|
|
ctr, err := mtr.Int64ObservableCounter("aicounter")
|
2022-11-08 17:45:23 +02:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2023-01-08 17:53:07 +02:00
|
|
|
_, err = mtr.RegisterCallback([]instrument.Asynchronous{ctr}, func(ctx context.Context) error {
|
2022-11-08 17:45:23 +02:00
|
|
|
ctr.Observe(ctx, 10, attribute.String("foo", "bar"), attribute.Int("version", 1))
|
|
|
|
ctr.Observe(ctx, 20, attribute.String("foo", "bar"), attribute.Int("version", 2))
|
2023-01-08 17:53:07 +02:00
|
|
|
return nil
|
2022-11-08 17:45:23 +02:00
|
|
|
})
|
2022-12-16 22:02:42 +02:00
|
|
|
return err
|
2022-11-08 17:45:23 +02:00
|
|
|
},
|
|
|
|
wantMetric: metricdata.Metrics{
|
|
|
|
Name: "aicounter",
|
|
|
|
Data: metricdata.Sum[int64]{
|
|
|
|
DataPoints: []metricdata.DataPoint[int64]{
|
|
|
|
{
|
|
|
|
Attributes: attribute.NewSet(attribute.String("foo", "bar")),
|
|
|
|
Value: 20, // TODO (#3439): This should be 30.
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
IsMonotonic: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2023-01-04 22:47:18 +02:00
|
|
|
name: "ObservableInt64UpDownCounter",
|
2022-11-08 17:45:23 +02:00
|
|
|
register: func(t *testing.T, mtr metric.Meter) error {
|
2023-01-03 20:34:10 +02:00
|
|
|
ctr, err := mtr.Int64ObservableUpDownCounter("aiupdowncounter")
|
2022-11-08 17:45:23 +02:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2023-01-08 17:53:07 +02:00
|
|
|
_, err = mtr.RegisterCallback([]instrument.Asynchronous{ctr}, func(ctx context.Context) error {
|
2022-11-08 17:45:23 +02:00
|
|
|
ctr.Observe(ctx, 10, attribute.String("foo", "bar"), attribute.Int("version", 1))
|
|
|
|
ctr.Observe(ctx, 20, attribute.String("foo", "bar"), attribute.Int("version", 2))
|
2023-01-08 17:53:07 +02:00
|
|
|
return nil
|
2022-11-08 17:45:23 +02:00
|
|
|
})
|
2022-12-16 22:02:42 +02:00
|
|
|
return err
|
2022-11-08 17:45:23 +02:00
|
|
|
},
|
|
|
|
wantMetric: metricdata.Metrics{
|
|
|
|
Name: "aiupdowncounter",
|
|
|
|
Data: metricdata.Sum[int64]{
|
|
|
|
DataPoints: []metricdata.DataPoint[int64]{
|
|
|
|
{
|
|
|
|
Attributes: attribute.NewSet(attribute.String("foo", "bar")),
|
|
|
|
Value: 20, // TODO (#3439): This should be 30.
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
IsMonotonic: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2023-01-04 22:47:18 +02:00
|
|
|
name: "ObservableInt64Gauge",
|
2022-11-08 17:45:23 +02:00
|
|
|
register: func(t *testing.T, mtr metric.Meter) error {
|
2023-01-03 20:34:10 +02:00
|
|
|
ctr, err := mtr.Int64ObservableGauge("aigauge")
|
2022-11-08 17:45:23 +02:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2023-01-08 17:53:07 +02:00
|
|
|
_, err = mtr.RegisterCallback([]instrument.Asynchronous{ctr}, func(ctx context.Context) error {
|
2022-11-08 17:45:23 +02:00
|
|
|
ctr.Observe(ctx, 10, attribute.String("foo", "bar"), attribute.Int("version", 1))
|
|
|
|
ctr.Observe(ctx, 20, attribute.String("foo", "bar"), attribute.Int("version", 2))
|
2023-01-08 17:53:07 +02:00
|
|
|
return nil
|
2022-11-08 17:45:23 +02:00
|
|
|
})
|
2022-12-16 22:02:42 +02:00
|
|
|
return err
|
2022-11-08 17:45:23 +02:00
|
|
|
},
|
|
|
|
wantMetric: metricdata.Metrics{
|
|
|
|
Name: "aigauge",
|
|
|
|
Data: metricdata.Gauge[int64]{
|
|
|
|
DataPoints: []metricdata.DataPoint[int64]{
|
|
|
|
{
|
|
|
|
Attributes: attribute.NewSet(attribute.String("foo", "bar")),
|
|
|
|
Value: 20,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "SyncFloat64Counter",
|
|
|
|
register: func(t *testing.T, mtr metric.Meter) error {
|
2023-01-03 20:34:10 +02:00
|
|
|
ctr, err := mtr.Float64Counter("sfcounter")
|
2022-11-08 17:45:23 +02:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
ctr.Add(context.Background(), 1.0, attribute.String("foo", "bar"), attribute.Int("version", 1))
|
|
|
|
ctr.Add(context.Background(), 2.0, attribute.String("foo", "bar"), attribute.Int("version", 2))
|
|
|
|
return nil
|
|
|
|
},
|
|
|
|
wantMetric: metricdata.Metrics{
|
|
|
|
Name: "sfcounter",
|
|
|
|
Data: metricdata.Sum[float64]{
|
|
|
|
DataPoints: []metricdata.DataPoint[float64]{
|
|
|
|
{
|
|
|
|
Attributes: attribute.NewSet(attribute.String("foo", "bar")),
|
|
|
|
Value: 3.0,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
IsMonotonic: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "SyncFloat64UpDownCounter",
|
|
|
|
register: func(t *testing.T, mtr metric.Meter) error {
|
2023-01-03 20:34:10 +02:00
|
|
|
ctr, err := mtr.Float64UpDownCounter("sfupdowncounter")
|
2022-11-08 17:45:23 +02:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
ctr.Add(context.Background(), 1.0, attribute.String("foo", "bar"), attribute.Int("version", 1))
|
|
|
|
ctr.Add(context.Background(), 2.0, attribute.String("foo", "bar"), attribute.Int("version", 2))
|
|
|
|
return nil
|
|
|
|
},
|
|
|
|
wantMetric: metricdata.Metrics{
|
|
|
|
Name: "sfupdowncounter",
|
|
|
|
Data: metricdata.Sum[float64]{
|
|
|
|
DataPoints: []metricdata.DataPoint[float64]{
|
|
|
|
{
|
|
|
|
Attributes: attribute.NewSet(attribute.String("foo", "bar")),
|
|
|
|
Value: 3.0,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
IsMonotonic: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "SyncFloat64Histogram",
|
|
|
|
register: func(t *testing.T, mtr metric.Meter) error {
|
2023-01-03 20:34:10 +02:00
|
|
|
ctr, err := mtr.Float64Histogram("sfhistogram")
|
2022-11-08 17:45:23 +02:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
ctr.Record(context.Background(), 1.0, attribute.String("foo", "bar"), attribute.Int("version", 1))
|
|
|
|
ctr.Record(context.Background(), 2.0, attribute.String("foo", "bar"), attribute.Int("version", 2))
|
|
|
|
return nil
|
|
|
|
},
|
|
|
|
wantMetric: metricdata.Metrics{
|
|
|
|
Name: "sfhistogram",
|
|
|
|
Data: metricdata.Histogram{
|
|
|
|
DataPoints: []metricdata.HistogramDataPoint{
|
|
|
|
{
|
|
|
|
Attributes: attribute.NewSet(attribute.String("foo", "bar")),
|
|
|
|
Bounds: []float64{0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000},
|
|
|
|
BucketCounts: []uint64{0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
|
|
|
Count: 2,
|
|
|
|
Min: &one,
|
|
|
|
Max: &two,
|
|
|
|
Sum: 3.0,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "SyncInt64Counter",
|
|
|
|
register: func(t *testing.T, mtr metric.Meter) error {
|
2023-01-03 20:34:10 +02:00
|
|
|
ctr, err := mtr.Int64Counter("sicounter")
|
2022-11-08 17:45:23 +02:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
ctr.Add(context.Background(), 10, attribute.String("foo", "bar"), attribute.Int("version", 1))
|
|
|
|
ctr.Add(context.Background(), 20, attribute.String("foo", "bar"), attribute.Int("version", 2))
|
|
|
|
return nil
|
|
|
|
},
|
|
|
|
wantMetric: metricdata.Metrics{
|
|
|
|
Name: "sicounter",
|
|
|
|
Data: metricdata.Sum[int64]{
|
|
|
|
DataPoints: []metricdata.DataPoint[int64]{
|
|
|
|
{
|
|
|
|
Attributes: attribute.NewSet(attribute.String("foo", "bar")),
|
|
|
|
Value: 30,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
IsMonotonic: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "SyncInt64UpDownCounter",
|
|
|
|
register: func(t *testing.T, mtr metric.Meter) error {
|
2023-01-03 20:34:10 +02:00
|
|
|
ctr, err := mtr.Int64UpDownCounter("siupdowncounter")
|
2022-11-08 17:45:23 +02:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
ctr.Add(context.Background(), 10, attribute.String("foo", "bar"), attribute.Int("version", 1))
|
|
|
|
ctr.Add(context.Background(), 20, attribute.String("foo", "bar"), attribute.Int("version", 2))
|
|
|
|
return nil
|
|
|
|
},
|
|
|
|
wantMetric: metricdata.Metrics{
|
|
|
|
Name: "siupdowncounter",
|
|
|
|
Data: metricdata.Sum[int64]{
|
|
|
|
DataPoints: []metricdata.DataPoint[int64]{
|
|
|
|
{
|
|
|
|
Attributes: attribute.NewSet(attribute.String("foo", "bar")),
|
|
|
|
Value: 30,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
IsMonotonic: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "SyncInt64Histogram",
|
|
|
|
register: func(t *testing.T, mtr metric.Meter) error {
|
2023-01-03 20:34:10 +02:00
|
|
|
ctr, err := mtr.Int64Histogram("sihistogram")
|
2022-11-08 17:45:23 +02:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
ctr.Record(context.Background(), 1, attribute.String("foo", "bar"), attribute.Int("version", 1))
|
|
|
|
ctr.Record(context.Background(), 2, attribute.String("foo", "bar"), attribute.Int("version", 2))
|
|
|
|
return nil
|
|
|
|
},
|
|
|
|
wantMetric: metricdata.Metrics{
|
|
|
|
Name: "sihistogram",
|
|
|
|
Data: metricdata.Histogram{
|
|
|
|
DataPoints: []metricdata.HistogramDataPoint{
|
|
|
|
{
|
|
|
|
Attributes: attribute.NewSet(attribute.String("foo", "bar")),
|
|
|
|
Bounds: []float64{0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000},
|
|
|
|
BucketCounts: []uint64{0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
|
|
|
Count: 2,
|
|
|
|
Min: &one,
|
|
|
|
Max: &two,
|
|
|
|
Sum: 3.0,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Temporality: metricdata.CumulativeTemporality,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
for _, tt := range testcases {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
rdr := NewManualReader()
|
|
|
|
mtr := NewMeterProvider(
|
|
|
|
WithReader(rdr),
|
2022-11-19 19:05:20 +02:00
|
|
|
WithView(NewView(
|
|
|
|
Instrument{Name: "*"},
|
|
|
|
Stream{AttributeFilter: func(kv attribute.KeyValue) bool {
|
|
|
|
return kv.Key == attribute.Key("foo")
|
|
|
|
}},
|
|
|
|
)),
|
2022-11-08 17:45:23 +02:00
|
|
|
).Meter("TestAttributeFilter")
|
2022-11-19 19:05:20 +02:00
|
|
|
require.NoError(t, tt.register(t, mtr))
|
2022-11-08 17:45:23 +02:00
|
|
|
|
|
|
|
m, err := rdr.Collect(context.Background())
|
|
|
|
assert.NoError(t, err)
|
|
|
|
|
|
|
|
require.Len(t, m.ScopeMetrics, 1)
|
|
|
|
require.Len(t, m.ScopeMetrics[0].Metrics, 1)
|
|
|
|
|
|
|
|
metricdatatest.AssertEqual(t, tt.wantMetric, m.ScopeMetrics[0].Metrics[0], metricdatatest.IgnoreTimestamp())
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
2022-11-11 02:04:53 +02:00
|
|
|
|
|
|
|
var (
|
2023-01-11 01:06:24 +02:00
|
|
|
aiCounter instrument.Int64ObservableCounter
|
|
|
|
aiUpDownCounter instrument.Int64ObservableUpDownCounter
|
|
|
|
aiGauge instrument.Int64ObservableGauge
|
2022-11-11 02:04:53 +02:00
|
|
|
|
2023-01-11 01:06:24 +02:00
|
|
|
afCounter instrument.Float64ObservableCounter
|
|
|
|
afUpDownCounter instrument.Float64ObservableUpDownCounter
|
|
|
|
afGauge instrument.Float64ObservableGauge
|
2022-11-11 02:04:53 +02:00
|
|
|
|
2023-01-11 01:06:24 +02:00
|
|
|
siCounter instrument.Int64Counter
|
|
|
|
siUpDownCounter instrument.Int64UpDownCounter
|
|
|
|
siHistogram instrument.Int64Histogram
|
2022-11-11 02:04:53 +02:00
|
|
|
|
2023-01-11 01:06:24 +02:00
|
|
|
sfCounter instrument.Float64Counter
|
|
|
|
sfUpDownCounter instrument.Float64UpDownCounter
|
|
|
|
sfHistogram instrument.Float64Histogram
|
2022-11-11 02:04:53 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func BenchmarkInstrumentCreation(b *testing.B) {
|
|
|
|
provider := NewMeterProvider(WithReader(NewManualReader()))
|
|
|
|
meter := provider.Meter("BenchmarkInstrumentCreation")
|
|
|
|
|
|
|
|
b.ReportAllocs()
|
|
|
|
b.ResetTimer()
|
|
|
|
|
|
|
|
for n := 0; n < b.N; n++ {
|
2023-01-04 22:47:18 +02:00
|
|
|
aiCounter, _ = meter.Int64ObservableCounter("observable.int64.counter")
|
|
|
|
aiUpDownCounter, _ = meter.Int64ObservableUpDownCounter("observable.int64.up.down.counter")
|
|
|
|
aiGauge, _ = meter.Int64ObservableGauge("observable.int64.gauge")
|
2022-11-11 02:04:53 +02:00
|
|
|
|
2023-01-04 22:47:18 +02:00
|
|
|
afCounter, _ = meter.Float64ObservableCounter("observable.float64.counter")
|
|
|
|
afUpDownCounter, _ = meter.Float64ObservableUpDownCounter("observable.float64.up.down.counter")
|
|
|
|
afGauge, _ = meter.Float64ObservableGauge("observable.float64.gauge")
|
2022-11-11 02:04:53 +02:00
|
|
|
|
2023-01-03 20:34:10 +02:00
|
|
|
siCounter, _ = meter.Int64Counter("sync.int64.counter")
|
|
|
|
siUpDownCounter, _ = meter.Int64UpDownCounter("sync.int64.up.down.counter")
|
|
|
|
siHistogram, _ = meter.Int64Histogram("sync.int64.histogram")
|
2022-11-11 02:04:53 +02:00
|
|
|
|
2023-01-03 20:34:10 +02:00
|
|
|
sfCounter, _ = meter.Float64Counter("sync.float64.counter")
|
|
|
|
sfUpDownCounter, _ = meter.Float64UpDownCounter("sync.float64.up.down.counter")
|
|
|
|
sfHistogram, _ = meter.Float64Histogram("sync.float64.histogram")
|
2022-11-11 02:04:53 +02:00
|
|
|
}
|
|
|
|
}
|