Comment should be complete sentences outside of lists with sentence
fragments. This adds the godot linter to check these complete sentences
end with punctuation. If they do not, running fix will append a period.
* Change trace options to accept type not pointer
Add benchmark to show allocation improvement.
* Update CONTRIBUTING.md guidelines
* Update all Option iface
* Fix grammar in CONTRIBUTING
* Update SamplingParameters
Remove HasRemoteParent fields from SamplingParameters. The
HasRemoteParent field is a duplicate of the Remote field of the parent
span context contained in the ParentContext.
Change the `ParentContext` field from storing a `SpanContext` to a
`context.Context` that holds the parent span. This is to conform with
the OpenTelemetry specification and resolve#1727.
* Update PR number
* Make SpanContext Immutable
* Adds NewSpanContext() constructor and SpanContextConfig{} struct for
constructing a new SpanContext when all fields are known
* Adds With<field>() methods to SpanContext for deriving a SpanContext
with a single field changed.
* Updates all uses of SpanContext to use the new API
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Add tests for new SpanContext constructor and derivation
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Address PR feedback
* Fix new uses of SpanContext from main
* Add Tracestate into the SamplingResult struct
Add `trace.Tracestate` field into the SDK `trace.SamplingResult` struct.
Use ParentContext from SamplingParameters to return Tracestate in
`traceIDRatioSampler`, `alwaysOnSampler` and `alwaysOffSampler`.
Add a new test to check that Tracestate is passed.
* Updated CHANGELOG.md for #1432 PR
Added changes description for #1432.
* Update sdk/trace/sampling_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* 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>
* 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
* Change name of ProbabilitySampler to TraceIdRatioBased
* Modify behavior to ignore parent span
* Add test for inclusivity property on TraceIdRatioBased sampler
* Modify tests in `trace_test.go` to reflect change in parent
span behavior
* Add to CHANGELOG
* Satisfy golint
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* 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)
* update always and never sample descriptions
* fix typo
* rename always on / off sampler files, structs and variables to match
Co-authored-by: Rahul Patel <rahulpa@google.com>
* Refactor SDK Sampler API to conform to Spec
* Sampler is now an interface rather than a function type
* SamplingParameters include the span Kind, Attributes, and Links
* SamplingResult includes a SamplingDecision with three possible values, as well as Attributes
* Add attributes retruned from a Sampler to the span
* Add SpanKind, Attributes, and Links to API Sampler.ShouldSample() parameters
* Drop "Get" from sdk Sampler.GetDescription to match api Sampler
* Make spanID parameter in API Sampler interface a core.SpanID
* Fix types and printf format per PR feedback from krnowak
* Ensure unit test error messages reflect new reality
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
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
* api(trace): change trace id to byte array.
* fix lint errors
* add helper to create trace id from hex and improve stdout exporter.
* remove comma.
* fix lint
* change TraceIDFromHex to be compliant with w3 trace-context
* revert remove of hex16 regex because its used to parse SpanID
* lint
* fix typo
* trace sdk initial commit.
* fix imports and comments.
* remove tracestate
* split trace.go
* add attribute over limit test.
* add comments and restructure span.go and tracer.go
* refactor MessageEvent
* defer unlock
* some more cleanup in span.go
* rename *MessageEvent* to *Event*
* cleanup comments in trace_test.go
* fix typos.
* return full string ID for traceID and spanID.