Mahendra Bishnoi
a10652b501
sdk/trace: trace id high 64 bit tests ( #7212 )
...
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/7160
- Modified `testIDGenerator` to have both low and high bits (in uint64
form) since we can't store 128 bits integer
- start with high seed values (taken from
https://github.com/open-telemetry/opentelemetry-go/pull/7155 )
- validate both high and low 64 bits of trace id
Does not need a CHANGELOG entry - test only.
---------
Co-authored-by: Damien Mathieu <42@dmathieu.com >
Co-authored-by: Robert Pająk <pellared@hotmail.com >
Co-authored-by: dmathieu <damien.mathieu@elastic.co >
2025-10-06 11:13:51 +02:00
Flc゛
80cb909774
refactor: replace context.Background() with t.Context()/b.Context() in tests ( #7352 )
...
Based on the Go version we currently use, the dependency already
supports 1.24+, which allows using `t.Context()` and `b.Context()` in
unit tests and benchmarks respectively.
- Enable `context-background` and `context-todo` in
[`usetesting`](https://golangci-lint.run/docs/linters/configuration/#usetesting )
- Adjust the code to support linter detection
---------
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
Co-authored-by: Tyler Yahn <codingalias@gmail.com >
Co-authored-by: Damien Mathieu <42@dmathieu.com >
2025-09-23 09:52:45 +02:00
Tyler Yahn
5b808c6ad5
Encapsulate SDK Tracer observability ( #7331 )
...
Split from #7316
[Follow
guidelines](a5dcd68ebb/CONTRIBUTING.md (encapsulation) )
and move instrumentation into its own type.
### Benchmarks
#### Added `sdk/trace/internal/observ` benchmarks
```
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/sdk/trace/internal/observ
cpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
│ enc-trace-sdk-tracer-obs.out │
│ sec/op │
Tracer/SpanStarted-8 7.436n ± 6%
Tracer/SpanLive-8 9.987n ± 8%
Tracer/SpanEnded-8 11.32n ± 7%
NewTracer-8 87.64n ± 6%
geomean 16.48n
│ enc-trace-sdk-tracer-obs.out │
│ B/op │
Tracer/SpanStarted-8 0.000 ± 0%
Tracer/SpanLive-8 0.000 ± 0%
Tracer/SpanEnded-8 0.000 ± 0%
NewTracer-8 0.000 ± 0%
geomean ¹
¹ summaries must be >0 to compute geomean
│ enc-trace-sdk-tracer-obs.out │
│ allocs/op │
Tracer/SpanStarted-8 0.000 ± 0%
Tracer/SpanLive-8 0.000 ± 0%
Tracer/SpanEnded-8 0.000 ± 0%
NewTracer-8 0.000 ± 0%
geomean ¹
¹ summaries must be >0 to compute geomean
```
#### Existing `sdk/trace` benchmarks
```console
> benchstat main.out enc-trace-sdk-tracer-obs.out
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/sdk/trace
cpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
│ main.out │ enc-trace-sdk-tracer-obs.out │
│ sec/op │ sec/op vs base │
SpanEnd/ObservabilityEnabled-8 188.5n ± 4% 131.5n ± 32% -30.24% (p=0.000 n=10)
TraceStart/ObservabilityEnabled-8 886.9n ± 8% 663.9n ± 2% -25.14% (p=0.000 n=10)
geomean 408.9n 295.5n -27.73%
│ main.out │ enc-trace-sdk-tracer-obs.out │
│ B/op │ B/op vs base │
SpanEnd/ObservabilityEnabled-8 16.00 ± 0% 0.00 ± 0% -100.00% (p=0.000 n=10)
TraceStart/ObservabilityEnabled-8 608.0 ± 0% 576.0 ± 0% -5.26% (p=0.000 n=10)
geomean 98.63 ? ¹ ²
¹ summaries must be >0 to compute geomean
² ratios must be >0 to compute geomean
│ main.out │ enc-trace-sdk-tracer-obs.out │
│ allocs/op │ allocs/op vs base │
SpanEnd/ObservabilityEnabled-8 1.000 ± 0% 0.000 ± 0% -100.00% (p=0.000 n=10)
TraceStart/ObservabilityEnabled-8 5.000 ± 0% 3.000 ± 0% -40.00% (p=0.000 n=10)
geomean 2.236 ? ¹ ²
¹ summaries must be >0 to compute geomean
² ratios must be >0 to compute geomean
```
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-09-15 12:18:32 -07:00
Tyler Yahn
4fdd552782
Track context containing span in recordingSpan ( #7354 )
...
Avoid the allocation of re-embedding the span in a context on end by
keeping the one created on start in the span.
### Benchmarks
```
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/sdk/trace
cpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
│ main.out │ trace-recording-span-ctx.out │
│ sec/op │ sec/op vs base │
SpanEnd/ObservabilityEnabled-8 248.2n ± 5% 186.2n ± 4% -24.94% (p=0.000 n=20)
TraceStart/ObservabilityEnabled-8 935.8n ± 2% 995.9n ± 4% +6.43% (p=0.000 n=20)
geomean 481.9n 430.7n -10.62%
│ main.out │ trace-recording-span-ctx.out │
│ B/op │ B/op vs base │
SpanEnd/ObservabilityEnabled-8 64.00 ± 0% 16.00 ± 0% -75.00% (p=0.000 n=20)
TraceStart/ObservabilityEnabled-8 608.0 ± 0% 608.0 ± 0% ~ (p=1.000 n=20) ¹
geomean 197.3 98.63 -50.00%
¹ all samples are equal
│ main.out │ trace-recording-span-ctx.out │
│ allocs/op │ allocs/op vs base │
SpanEnd/ObservabilityEnabled-8 2.000 ± 0% 1.000 ± 0% -50.00% (p=0.000 n=20)
TraceStart/ObservabilityEnabled-8 5.000 ± 0% 5.000 ± 0% ~ (p=1.000 n=20) ¹
geomean 3.162 2.236 -29.29%
¹ all samples are equal
```
2025-09-15 10:54:12 -07:00
Tyler Yahn
7fdebbe3ed
Rename Self-Observability as just Observability ( #7302 )
...
Self-Observability is a redundant term, the self being instrumented is
always the self that observability is being provided for. Remove this
redundancy.
Continue to provide backwards compatibility for any users already using
`OTEL_GO_X_SELF_OBSERVABILITY` to enable the feature.
---------
Co-authored-by: Damien Mathieu <42@dmathieu.com >
2025-09-11 10:01:19 +02:00
Tyler Yahn
9798759463
Statically define trace observability attributes ( #7263 )
...
There are a finite set of attributes that can be recorded with self
observability instruments. Cache these combinations to avoid computation
and allocations on the hot-path of tracing.
### Benchmarks
```console
$ benchstat main_25d02741f.txt cache-trace-obs-sets_05fd6ee.txt
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/sdk/trace
cpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
│ main_25d02741f.txt │ cache-trace-obs-sets_05fd6ee.txt │
│ sec/op │ sec/op vs base │
SpanEnd/SelfObservabilityEnabled-8 366.2n ± 5% 229.2n ± 3% -37.39% (p=0.000 n=10)
TraceStart/SelfObservabilityEnabled-8 1076.0n ± 2% 800.2n ± 2% -25.63% (p=0.000 n=10)
geomean 627.7n 428.3n -31.76%
│ main_25d02741f.txt │ cache-trace-obs-sets_05fd6ee.txt │
│ B/op │ B/op vs base │
SpanEnd/SelfObservabilityEnabled-8 192.00 ± 0% 64.00 ± 0% -66.67% (p=0.000 n=10)
TraceStart/SelfObservabilityEnabled-8 992.0 ± 0% 608.0 ± 0% -38.71% (p=0.000 n=10)
geomean 436.4 197.3 -54.80%
│ main_25d02741f.txt │ cache-trace-obs-sets_05fd6ee.txt │
│ allocs/op │ allocs/op vs base │
SpanEnd/SelfObservabilityEnabled-8 4.000 ± 0% 2.000 ± 0% -50.00% (p=0.000 n=10)
TraceStart/SelfObservabilityEnabled-8 9.000 ± 0% 5.000 ± 0% -44.44% (p=0.000 n=10)
geomean 6.000 3.162 -47.30%
```
2025-08-29 08:36:54 -07:00
Tyler Yahn
5358fd737d
Upgrade semconv dependencies to v1.37.0 ( #7260 )
...
Resolve https://github.com/open-telemetry/opentelemetry-go/issues/7255
2025-08-28 11:29:52 +02:00
Tyler Yahn
c8b89e9780
Propagate context to self-observability measurements in sdk/trace ( #7209 )
...
Ensures metric functionality that integrates with trace context (e.g.
exemplars) correctly receive the trace context and anything else the
user has passed.
2025-08-26 08:58:35 -07:00
Bryan Boreham
8b17b897d2
sdk/trace: More trace id tests ( #7155 )
...
* Check that IDs round-trip between binary and hex string formats.
`TestIDsRoundTrip` is patterned after `TestNewIDs`.
* Check that bad values give the expected errors.
* Use larger values in `TestWithIDGenerator`. Previously, nearly all the
bits were zero so a mistake in encoding/decoding higher bits could be
missed.
Start with arbitrary values with more bits set.
(Span ID still has top half as zero due to taking an uint64)
* Modify `testIDGenerator` so this ^^ change runs on 32-bit platforms.
The idea for more tests arose while considering #6791 .
Does not need a CHANGELOG entry - test only.
---------
Signed-off-by: Bryan Boreham <bjboreham@gmail.com >
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
2025-08-21 09:23:32 -07:00
Tyler Yahn
bb5b0a8e61
Use t.Cleanup instead of defer in sdk/trace ( #7208 )
...
Let the testing system ensure proper cleanup ordering and execution. Do
not wait to function return to run all the `defer`s from the loops.
2025-08-18 12:42:16 +02:00
Matthieu MOREL
68841fa6db
chore: enable unused-receiver rule from revive ( #7130 )
...
#### Description
Enable and fixes
[unused-receiver](https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unused-receiver )
rule from revive
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2025-08-08 15:38:22 -07:00
Matthieu MOREL
d464abf1f3
chore: enable unused-parameter rule from revive ( #7122 )
...
#### Description
Enable and fixes
[unused-parameter](https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unused-parameter )
rule from revive
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2025-08-04 12:48:04 -07:00
Mikhail Mazurskiy
5e1c62a2d5
Modernize ( #7089 )
...
Use
https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize
to update code to new style.
---------
Co-authored-by: Flc゛ <four_leaf_clover@foxmail.com >
Co-authored-by: Damien Mathieu <42@dmathieu.com >
2025-07-29 10:19:11 +02:00
Robert Pająk
186def7c56
sdk/trace: self-observability: span metrics ( #7027 )
...
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/7003
Implement following self-observability metrics from
https://github.com/open-telemetry/semantic-conventions/blob/v1.36.0/docs/otel/sdk-metrics.md
for https://pkg.go.dev/go.opentelemetry.io/otel/sdk/trace :
- `otel.sdk.span.live`
- `otel.sdk.span.started`
2025-07-22 11:36:06 +02:00
Damien Mathieu
351a51f1ed
Use existing schema URLs in tests ( #6924 )
...
The 1.2.0 schema URL isn't avaibable (anymore?). So link checks are
failing.
This upgrades the schema URLs to 1.21.0.
See
https://cloud-native.slack.com/archives/C02UN96HZH6/p1750664367346769
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com >
2025-06-24 09:02:21 +02:00
Tyler Yahn
33eb582188
Upgrade semconv to 1.34.0 in sdk/trace ( #6835 )
2025-05-28 11:10:10 -07:00
Zhengke Zhou
a486ca5722
sdk/trace: Move testing harness to trace ( #6589 )
...
Closes : #6543
---------
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
2025-04-10 08:59:11 -07:00
Tyler Yahn
7512a2be2e
Add the golines golangci-lint formatter ( #6513 )
...
Ensure consistent line wrapping (<= 120 characters) within the project.
2025-03-30 03:46:44 -07:00
Zhengke Zhou
63f3cfe1b5
sdk/trace: Manage trace environment variables in testing package ( #6552 )
...
Fix : #6542
Co-authored-by: Damien Mathieu <42@dmathieu.com >
2025-03-28 09:45:34 +01:00
renovate[bot]
05de07bcf5
chore(deps): update module github.com/antonboom/testifylint to v1.6.0 ( #6440 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/Antonboom/testifylint](https://redirect.github.com/Antonboom/testifylint )
| `v1.5.2` -> `v1.6.0` |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.
---
### Release Notes
<details>
<summary>Antonboom/testifylint
(github.com/Antonboom/testifylint)</summary>
###
[`v1.6.0`](https://redirect.github.com/Antonboom/testifylint/releases/tag/v1.6.0 ):
– new `equal-values` and `suite-method-signature`
[Compare
Source](https://redirect.github.com/Antonboom/testifylint/compare/v1.5.2...v1.6.0 )
#### What's Changed
##### New checkers
- new checker `equal-values` by
[@​Antonboom](https://redirect.github.com/Antonboom ) in
[https://github.com/Antonboom/testifylint/pull/223 ](https://redirect.github.com/Antonboom/testifylint/pull/223 )
- new checker `suite-method-signature` by
[@​Antonboom](https://redirect.github.com/Antonboom ) in
[https://github.com/Antonboom/testifylint/pull/228 ](https://redirect.github.com/Antonboom/testifylint/pull/228 )
##### New features
- `len`: support len-len and value-len cases by
[@​Antonboom](https://redirect.github.com/Antonboom ) in
[https://github.com/Antonboom/testifylint/pull/204 ](https://redirect.github.com/Antonboom/testifylint/pull/204 )
- `error-is-as`: support NotErrorAs by
[@​Antonboom](https://redirect.github.com/Antonboom ) in
[https://github.com/Antonboom/testifylint/pull/219 ](https://redirect.github.com/Antonboom/testifylint/pull/219 )
- `useless-assert`: add NotElementsMatch and NotErrorAs by
[@​Antonboom](https://redirect.github.com/Antonboom ) in
[https://github.com/Antonboom/testifylint/pull/220 ](https://redirect.github.com/Antonboom/testifylint/pull/220 )
- `formatter`: support non-string-message checks by
[@​Antonboom](https://redirect.github.com/Antonboom ) in
[https://github.com/Antonboom/testifylint/pull/221 ](https://redirect.github.com/Antonboom/testifylint/pull/221 )
- `formatter`: warn on empty message by
[@​Antonboom](https://redirect.github.com/Antonboom ) in
[https://github.com/Antonboom/testifylint/pull/225 ](https://redirect.github.com/Antonboom/testifylint/pull/225 )
- `empty`: support empty strings, Zero for strings and len + bubbled
useless-assert cases by
[@​ccoVeille](https://redirect.github.com/ccoVeille ) in
[https://github.com/Antonboom/testifylint/pull/129 ](https://redirect.github.com/Antonboom/testifylint/pull/129 )
##### New fixes
- `negative-positive`: remove untyping, ignore Negative for len
comparisons by
[@​Antonboom](https://redirect.github.com/Antonboom ) in
[https://github.com/Antonboom/testifylint/pull/226 ](https://redirect.github.com/Antonboom/testifylint/pull/226 )
- fixes: support `assert.CollectT` by
[@​Antonboom](https://redirect.github.com/Antonboom ) in
[https://github.com/Antonboom/testifylint/pull/233 ](https://redirect.github.com/Antonboom/testifylint/pull/233 )
##### Bump deps
- Upgrade testdata to v1.10.0 of testify by
[@​Antonboom](https://redirect.github.com/Antonboom ) in
[https://github.com/Antonboom/testifylint/pull/218 ](https://redirect.github.com/Antonboom/testifylint/pull/218 )
- Go 1.24 by [@​Antonboom](https://redirect.github.com/Antonboom )
in
[https://github.com/Antonboom/testifylint/pull/234 ](https://redirect.github.com/Antonboom/testifylint/pull/234 )
- build(deps): bump golang.org/x/tools from 0.26.0 to 0.27.0 by
[@​dependabot](https://redirect.github.com/dependabot ) in
[https://github.com/Antonboom/testifylint/pull/206 ](https://redirect.github.com/Antonboom/testifylint/pull/206 )
- build(deps): bump rlespinasse/github-slug-action from 4.4.1 to 5.0.0
by [@​dependabot](https://redirect.github.com/dependabot ) in
[https://github.com/Antonboom/testifylint/pull/207 ](https://redirect.github.com/Antonboom/testifylint/pull/207 )
- build(deps): bump golang.org/x/tools from 0.27.0 to 0.29.0 by
[@​dependabot](https://redirect.github.com/dependabot ) in
[https://github.com/Antonboom/testifylint/pull/214 ](https://redirect.github.com/Antonboom/testifylint/pull/214 )
**Full Changelog**:
https://github.com/Antonboom/testifylint/compare/v1.5.2...v1.6.0
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/ ).
View the [repository job
log](https://developer.mend.io/github/open-telemetry/opentelemetry-go ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDAuMiIsInVwZGF0ZWRJblZlciI6IjM5LjIwMC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
Co-authored-by: Tyler Yahn <codingalias@gmail.com >
2025-03-13 14:31:12 -07:00
Robert Pająk
30c0f3fa6e
sdk/instrumentation: Add Attributes to Scope ( #5903 )
...
Towards https://github.com/open-telemetry/opentelemetry-go/issues/3368
2024-10-29 13:47:14 +01:00
Matthieu MOREL
6edc7a63df
[chore]: enable expected-actual rule from testifylint ( #5848 )
...
Testifylint is a linter that provides best practices with the use of
testify.
This PR enables
[expected-actual](https://github.com/Antonboom/testifylint?tab=readme-ov-file#expected-actual )
rule from [testifylint](https://github.com/Antonboom/testifylint )
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2024-09-26 12:04:33 +02:00
Damien Mathieu
4987a1dd4b
Split the span start/end benchmarks and test start with links and attributes ( #5554 )
...
I was looking at the trace benchmarks, and noticed this one, which says
it tests "span start", but ending the span is included within the data.
So this change removes ending the span from the computation, and adds a
new benchmark which only computes span end.
benchstat for span start:
```
pkg: go.opentelemetry.io/otel/sdk/trace
│ bench-main │ bench-branch │
│ sec/op │ sec/op vs base │
TraceStart-10 725.6n ± 3% 667.2n ± 2% -8.04% (p=0.000 n=10)
│ bench-main │ bench-branch │
│ B/op │ B/op vs base │
TraceStart-10 704.0 ± 0% 704.0 ± 0% ~ (p=1.000 n=10) ¹
¹ all samples are equal
│ bench-main │ bench-branch │
│ allocs/op │ allocs/op vs base │
TraceStart-10 14.00 ± 0% 14.00 ± 0% ~ (p=1.000 n=10) ¹
¹ all samples are equal
```
Benchmark for span end:
```
BenchmarkSpanEnd-10 16486819 147.7 ns/op 0 B/op 0 allocs/op
```
2024-06-28 11:51:09 +02:00
ttoad
30e82e01b6
trace: Use non-generic to replace newEvictedQueue in trace.start to reduce memory usage. ( #5497 )
...
benchstat:
```
goos: darwin
goarch: arm64
pkg: go.opentelemetry.io/otel/sdk/trace
│ old │ new │
│ sec/op │ sec/op vs base │
TraceStart-10 950.6n ± 1% 641.0n ± 0% -32.57% (p=0.000 n=10)
│ old │ new │
│ B/op │ B/op vs base │
TraceStart-10 1040.0 ± 0% 704.0 ± 0% -32.31% (p=0.000 n=10)
│ old │ new │
│ allocs/op │ allocs/op vs base │
TraceStart-10 20.00 ± 0% 14.00 ± 0% -30.00% (p=0.000 n=10)
```
---------
Co-authored-by: Damien Mathieu <damien.mathieu@elastic.co >
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
2024-06-17 07:39:03 -07:00
Tyler Yahn
6a0fa3c911
Upgrade semconv use to v1.26.0 ( #5490 )
...
Follow up to #5476
2024-06-06 09:36:59 -07:00
Tyler Yahn
999c6a07b3
Update all semconv use to v1.25.0 ( #5374 )
...
Resolve #5373
2024-05-19 07:16:33 +02:00
Anton Manakin
c00a51af86
Record links with empty span context ( #5315 )
...
* record links with empty span context
* add global trace state
* fix test comments and changelog
---------
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
2024-05-09 13:25:02 -07:00
Harish
1430e3fcd2
Merge Span.AddLink tests ( #5115 )
2024-05-09 07:09:30 +02:00
qcheng
554282d3e4
trace: Add Span.AddLink method ( #5032 )
2024-03-28 08:35:15 +01:00
Robert Pająk
7dea232a46
[chore] Simplify the license header ( #4987 )
2024-02-29 07:05:28 +01:00
Charlie Le
693eb7dbbb
Fix typos in docs and comments ( #4940 )
...
Ignoring words that would have renamed
- nam. -> name
- ans -> and
2024-02-17 13:36:41 +01:00
Robert Pająk
15b3f4d776
Fix TestWithIDGenerator ( #4894 )
2024-02-09 09:01:32 +01:00
Robert Pająk
01472db75f
Upgrade use of semconv to v1.24.0 ( #4754 )
2024-01-11 12:56:07 +01:00
Robert Pająk
8e756513a6
sdk/metric: Record measurements when context is done ( #4671 )
2023-12-15 19:14:16 +01:00
Tyler Yahn
5dff273a1e
Use gofumpt instead of gofmt ( #4623 )
...
* Use gofumpt instead of gofmt in golangci-lint conf
* Run gofumpt fixes
* Format generated templates
---------
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com >
2023-10-16 10:02:21 -07:00
Tyler Yahn
b7f634a4fe
Decouple use of otel/internal/internaltest ( #4424 )
...
* Add internaltest templates
* Generate internaltest using gotmpl
* Generate the sdk/internal/internaltest pkg
* Use sdk/internal/internaltest in sdk module
* Generate exporters/jaeger/internal/internaltest pkg
* Use exporters/jaeger/internal/internaltest in jaeger exporter
* Generate the exporters/zipkin/internal/internaltest pkg
* Use local internaltest in zipkin exporter
* Fix import path name in trace test
2023-08-09 09:15:47 +02:00
Tyler Yahn
9452b93012
Upgrade all use of semconv to v1.21.0 ( #4408 )
...
* Upgrade all use of semconv to v1.21.0
* Add change to changelog
* Add AIX and ZOS OS support
* Upgrade semconv for merged changes
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com >
2023-08-07 09:30:40 -07:00
Charlie Le
1b55281859
docs(typos): Run codespell to fix typos ( #3980 )
...
* docs(typos): Run codespell to fix typos
There were a lot of typos through the repository, so I ran
[codespell][], a tool for automatically fixing typos, to fix them.
```console
make codespell
```
There's already a tool called [misspell][] that's supposed to take care
of this, but misspell hasn't been updated for 6 years, and it doesn't
seem to be catching any of the typos that codespell can.
[codespell]: https://github.com/codespell-project/codespell
[misspell]: https://github.com/client9/misspell
* Revert and ignore spelling for Consequentially
* Add GH workflow for codespell
* Revert GH Workflow and Makefile for codespell
Per @pellared, since there's no instructions for setting up codespell,
it was suggested that the changes for setting up a workflow and section
in Makefile include instructions for setting up codespell as well.
* Revert spelling on consequently
---------
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com >
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
2023-04-11 17:28:13 -07:00
Tyler Yahn
ddf393886c
Use semconv creation functions ( #3683 )
2023-02-07 13:42:47 -08:00
Tyler Yahn
c7e2679529
Generate the semconv/v1.17.0 package ( #3599 )
...
* Generate semconv/v1.17.0
* Update all semconv use to v1.17
* Add changes to changelog
2023-01-24 08:10:41 -08:00
Tyler Yahn
78a55822f8
Upgrade all semconv dependencies to v1.16.0 ( #3581 )
...
* Upgrade all semconv ref to v1.16.0
* Add changes to changelog
2023-01-10 10:57:28 -08:00
Aaron Clawson
7aba25d651
Revert Adding attributes to the instrumentation scope.
...
Revert "Add instrumentation scope attributes (#3131 )" (#3154 )
This reverts commit 0078faeb0e .
Revert "Add WithScopeAttributes MeterOption to metric API package (#3132 )"
This reverts commit 81a9bab814 .
2022-09-09 09:06:58 -05:00
Tyler Yahn
0078faeb0e
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
2022-08-31 15:19:50 -07:00
Mitch Usher
55b49c407e
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 >
2022-08-26 08:53:33 -05:00
Tyler Yahn
5568a30723
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 >
2022-07-13 09:55:43 -04:00
Craig Pastro
575e1bb270
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 >
2022-07-06 14:55:46 -04:00
Tyler Yahn
1f5b159161
Use already enabled revive linter and add depguard ( #2883 )
...
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
2022-05-19 15:15:07 -05:00
Tyler Yahn
fdfc821bac
Add godot linter to golangci ( #2845 )
...
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.
2022-04-25 13:22:49 -07:00
Tyler Yahn
c05c3e237d
Add semconv/v1.10.0 ( #2842 )
...
* Add the semconv/v1.10.0 package
* Upgrade semconv used to v1.10.0
* Add changes to changelog
2022-04-22 07:41:28 -07:00
Brad Topol
8574d43509
Add semconv/v1.9.0 package ( #2792 )
...
* Add semconv/v1.9.0 package
Closes : #2756
Signed-off-by: Brad Topol <btopol@us.ibm.com >
* Updated PR number in CHANGELOG
Signed-off-by: Brad Topol <btopol@us.ibm.com >
2022-04-18 10:38:55 -07:00