1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-04 09:43:23 +02:00
Commit Graph

26 Commits

Author SHA1 Message Date
Ilya Kaznacheev
a6b31e0da1
Update SpanProcessor Shutdown with context and error (#1264)
* 1232: update SpanProcessor Shutdown with context and error

* 1232: add changelog info

* 1232: fix CI error, rm commented code

* 1232: fix CI unhandled error

* 1232: Done commit properly

* Add shutdown error handling

* Merge branch 'master' into update-span-processor

* Revert now unneeded context declaration move

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com>
2020-10-26 19:06:55 -07:00
Hui Kang
d75ccbb378
Add a Shutdown method to sdk TraceProvider (#1227)
* Add a Shutdown method to api TraceProvider

- sdktraceprovider shutdown span processors
- In examples, replace processosr shutdown with
  traceprovider's shutdown

Signed-off-by: Hui Kang <kangh@us.ibm.com>

* remove shutdown in the api provider interface

* Add context in parameter and return error

* handle error in shutdown

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-10-26 09:20:49 -07:00
Tyler Yahn
27c84d689d
Move trace api package into otel (#1229)
* Move trace API to otel

* Move tracetest to oteltest

* Update package documentation

* Remove old api/trace package

* Lint

* Add changes to CHANGELOG

* Add tests for rest of trace API

* Apply suggestions from code review

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* Documentation fixes

Includes resolutions for review issues.

* Correct CHANGELOG post release

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2020-10-08 19:58:56 -07:00
huikang
b97533a74b
Register/unregister in the fixed order (#1198)
- change the processors' map to array
- increase test coverage

Signed-off-by: Hui Kang <kangh@us.ibm.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-09-24 11:43:23 -07:00
Tyler Yahn
7d71867644
Rename *Provider names (#1190)
* Rename *Provider names

There is overlap in naming with MeterProviders and TracerProviders. This
is means the specification is not implemented and these types can not
exist in the same package (#1179). This makes each type and related
functions and types explicit.

* Add changes to CHANGELOG
2020-09-23 18:16:13 -04:00
Matej Gera
0041e2d26e
Rename ParentOrElse sampler to ParentBased and enhance it according to the spec (#1153)
* Rename ParentOrElse to ParentBased and enhance it according to the spec

- Renaming of type and sampler function
- Enhancing ParentBased with sampler options
- Set default samplers for each applicable parent-based case
- Adjust ShouldSample(...) func accordingly

* Adjust existing tests for ParentBased and add new ones

- add tests for ParentBased sampler options and description
- renaming in trace_test.go

* Update CHANGELOG.md

* PR feedback

- More clearer naming of structs; add comments where missing
- Adhere to the configuration style guide

* PR feedback - punctuation
2020-09-10 12:39:04 -07:00
JBD
9f4525847f
Convert XConfigure into constructors (#1155)
* Convert XConfigure into constructors

Previously, we discussed the possibility of converting
the config types into internal ones. But due to the
cyclic dependencies it introduces, we are only
converting XConfigure into constructors and document that
XConfig types are most likely are not going to be directly
used by developers.

In package documents, constructors will be nicely listed
under the config types and they won't be yet another
standalone symbol developers need to learn about.

Fixes #1130.

* Add the changes to the CHANGELOG
2020-09-10 15:15:17 -04:00
Tyler Yahn
422188a85f
Correct SDK trace Exporter interface (#1078)
* Update trace export interface

Move to conforming to the specification.

* Update documentation in export trace

* Update sdk trace provider to support new trace exporter

* Update SpanProcessors

Support the Provider changes and new trace exporter.

* Update the SDK to support the changes

* Update trace Provider to not return an error

* Update sdk with new Provider return

Also fix the testExporter ExportSpans method

* Update exporters with changes

* Update examples with changes

* Update Changelog

* Move error handling to end of shutdown

* Update exporter interface

Rename to SpanExporter to match specification. Add an error return value
to the Shutdown method based on feedback. Propagate these changes.

Remove the Stop method from the OTLP exporter to avoid confusion and
redundancy.

* Add test to check OTLP Shutdown honors context

* Add Jaeger exporter test for shutdown

* Fix race in Jaeger test

* Unify shutdown behavior and testing

* Update sdk/trace/simple_span_processor.go

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2020-09-09 10:19:03 -07:00
Tyler Yahn
0fec28040d
Update trace API TracerOption (#1109)
* Update Tracer configuration.

Conform to API option design outlined in #536.

Add tests to validate new TracerConfigure function

Drop the `instrumentation` prefix.

* Stick with instrumentationVersion for now

* Propagate changes

* Add changes to Changelog
2020-09-02 07:20:52 -07:00
Thomas Meire
e17e3caec8 Remove the orphaned RegisterSpanProcessor and UnregisterSpanProcessor #1077 2020-08-22 12:38:13 +02:00
MitchellDumovic
12992106de
Change default Sampler to ParentOrElse(AlwaysOn) (#989)
* Change default Sampler to ParentOrElse(AlwaysOn)

* add note to changelog
2020-07-29 19:10:12 -07:00
Tyler Yahn
a98bb979df
Update Tracer API with instrumentation version (#802)
* Update Tracer API with instrumentation version

Add option to the `Provider.Tracer` method to specify the
instrumentation version.

Update the global, noop, opentracing bridge, and default SDK
implementations.

This does not propagate the instrumentation library version to the
exported span. That is left for a follow-on PR.

* Revert trace_test.go

This is for the next PR.

* Update SDK to include version for default instrumentation

If the instrumentation library name is empty and the default
instrumentation is uses, include the SDK version.

* Update comments and documentation

* Remove default instrumentation version
2020-06-09 11:47:54 -07:00
Anthony J Mirabella
923a6c8afc Replace sdktrace.WithResourceAttributes() with WithResource() 2020-05-20 16:08:43 -04:00
Chen Yixiao
1301b6f3e4
Move core and key to kv package (#720)
* Move core to kv

* Move kv.Value to kv.value.Value

* Move key to kv
2020-05-13 16:06:03 -07:00
Joshua MacDonald
0bb12d9b1b
New api/label package, common label set impl (#651)
* New label set API

* Checkpoint

* Remove label.Labels interface

* Fix trace

* Remove label storage

* Restore metric_test.go

* Tidy tests

* More comments

* More comments

* Same changes as 654

* Checkpoint

* Fix batch labels

* Avoid Resource.Attributes() where possible

* Update comments and restore order in resource.go

* From feedback

* From feedback

* Move iterator_test & feedback

* Strenghten the label.Set test

* Feedback on typos

* Fix the set test per @krnowak

* Nit
2020-04-23 12:10:58 -07:00
Tyler Yahn
a485d0ec64
Update License header for all source files (#586)
* Update License header for all source files

- Add Apache 2.0 header to source files that did not have one.
- Update all existing headers dated to 2019 to be 2020
- Remove comma from License header to comply with the Apache 2.0
  guidelines.

* Update Copyright notice

Use the standard Copyright notices outlined by the
[CNCF](https://github.com/cncf/foundation/blob/master/copyright-notices.md#copyright-notices)
2020-03-23 22:41:10 -07:00
Rahul Patel
6ada85adba
add resource option to Provider. (#545)
- update otlp exporter to export resources.
2020-03-13 13:07:36 -07:00
Krzesimir Nowak
d9210f5676
Zipkin exporter (#495)
* Add zipkin exporter

The zipkin exporter implements the SpanBatcher interface. It follows
the current-at-the-time-of-writing document about conversion from
OpenTelemetry span data to Zipkin spans. Which means that endpoint
information is not yet filled.

* Fix typo in docs

* Add a zipkin example

This sends span information to a locally running zipkin collector.
Currently I have a problem getting the collector to show me the spans
after accepting them with HTTP 202. Not sure if this is because of
missing endpoint information.

* Make gitignore consistent

The fixed paths should be prefixed with a slash. The "relative" paths
mean that git will ignore all the files that end with the path.

* Add tests for zipkin exporter
2020-03-11 14:49:02 -07:00
Rahul Patel
161556aab8
Update provider to use AlwaysSampler instead of ProbabilitySampler (#506)
* update provider to use AlwaysSampler instead of ProbabilitySampler

* remove unused defaultSamplingProbability constant

* fix broken tests

* update failure message in test

* fix test description

Co-authored-by: Rahul Patel <rghetia@yahoo.com>
2020-03-05 13:29:51 -08:00
Jonas-Taha El Sesiy
1ab645fedb Consistently use pointer receivers for core.Number (#375)
Change all occurrences of value to pointer receivers
Add meta sys files to .gitignore
Code cleanup e.g.
- Don't capitalize error statements
- Fix ignored errors
- Fix ambiguous variable naming
- Remove unnecessary type casting
- Use named params

Fix #306
2019-12-09 13:03:11 -08:00
ferhat elmas
0f052af2f4 Rename GetTracer to Tracer (#347)
* Rename GetTracer to NewTracer

* Drop New prefix
2019-11-25 09:46:07 -08:00
Joshua MacDonald
68bd627ac2
Move export types into trace and metric-specific subdirs (#289) 2019-11-05 13:08:55 -08:00
Liz Fong-Jones
440b6653c9 remove rSSP and rBSP code, use NewProvider instead. (#271) 2019-11-01 16:35:18 -07:00
rghetia
15bfc5bb12
Namespace import path under "/otel" (#274)
Also fixes example module paths so that they use the vanity URL instead
of the github URL.

[Closes #184]
2019-11-01 11:40:29 -07:00
Edward Muller (SFDC)
f420f7409d sdk/trace: Test the Sampling Probability (#247)
* sdk/trace: Test the Sampling Probability

Closes #163

* Add tests for when the parent is sampled.
2019-10-29 16:53:50 -07:00
rghetia
b04db14146
WIP: Named tracer prototype (#227)
* named tracer prototype

* rename Manager to Provider.

* fix compile error after merge.

* rename Tracer method to GetTracer

* provider with options.

* update test.

* cleanup make circl-ci

* remove global config.

* some cleanup.

* use provider for bridge

* update propagation test.

* update examples and plugins.

* remove GlobalTracer methods.

* fix review comments.

* some more cleanup.

* remove unnecessary getTracer call in benchmark test.
2019-10-22 13:19:11 -07:00