1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-27 22:49:15 +02:00
Commit Graph

19 Commits

Author SHA1 Message Date
Tyler Yahn
44a0d621ee Pool attribute slices in stdouttrace self-observability (#7201)
### Benchmarks

```terminal
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/exporters/stdout/stdouttrace
cpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
                      │  main.txt   │   stdouttrace-pool-obs-attrs.txt   │
                      │   sec/op    │   sec/op     vs base               │
ExporterExportSpans-8   30.55µ ± 2%   31.76µ ± 3%  +3.96% (p=0.000 n=10)

                      │   main.txt   │   stdouttrace-pool-obs-attrs.txt    │
                      │     B/op     │     B/op      vs base               │
ExporterExportSpans-8   6.538Ki ± 0%   6.353Ki ± 0%  -2.84% (p=0.000 n=10)

                      │  main.txt  │  stdouttrace-pool-obs-attrs.txt   │
                      │ allocs/op  │ allocs/op   vs base               │
ExporterExportSpans-8   135.0 ± 0%   134.0 ± 0%  -0.74% (p=0.000 n=10)
```
2025-08-18 10:27:17 -07:00
Tyler Yahn
907d93b8e1 Handle partial export counts in stdouttrace observability (#7199)
Do not fail all exported metric counts if only some of them failed.
2025-08-18 09:37:33 -07:00
Tyler Yahn
e799586d10 Restructure component ID counting in stdouttrace (#7196)
Use a resettable counter so tests can have deterministic component IDs
that do not depend on previous state.
2025-08-17 09:05:09 -07:00
Tyler Yahn
cdd18ab3a1 Fix component name for stdouttrace (#7195)
The STDOUT exporter not a standardized type. Use the [semantic
convention recommendation of a "language-defined name of the
type"](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/registry/attributes/otel.md#otel-component-type).
2025-08-17 08:46:13 -07:00
Tyler Yahn
ee6d57b7cf Flatten stdouttrace Exporter.initSelfObservability into Exporter.New (#7197)
- Do not use [side-effect
programming](https://en.wikipedia.org/wiki/Side_effect_(computer_science))
to setup an exporter. Make the setup explicit, unique, and local.
- Report instrument creation errors back to the user instead of passing
them to `otel.Handle`.
2025-08-17 08:37:42 -07:00
Tyler Yahn
2ab7d4dc14 Use the context passed to ExportSpans for measurements in stdouttrace (#7198)
Without this the measurements are receiving broken context.
2025-08-17 08:26:57 -07:00
Flc゛
0a834865f6 feat(stdouttrace): add experimental self-observability metrics (#7133)
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/7008
2025-08-11 16:05:02 +02: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
Damien Mathieu
f6a5aa2c3f Add unparam linter (#5531)
This adds the [unparam](https://github.com/mvdan/unparam) linter.

Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2024-06-21 16:02:07 -07:00
Prasad Shirodkar
fd6d4db8c3 Remove context check on stdout exporters (#5189) 2024-04-25 17:11:45 +02:00
Robert Pająk
7dea232a46 [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
Alex Boten
8778c38832 docs: minor update to docstring (#4833)
Signed-off-by: Alex Boten <aboten@lightstep.com>
2024-01-19 15:18:16 +01: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
Aaron Clawson
f24f52aa06 Debug Logging for sdk/trace (#2500)
* Debug Logging for sdk/trace

* Fixes spelling, adds marshaling to attribute sets

Co-authored-by: Aaron Clawson <MadVikingGod@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2022-01-10 19:58:01 -05:00
Liz Fong-Jones
66fccc0be0 fix: lock accesses to encoder in json stdout exporter to prevent crash (#2265)
* lock accesses to encoder

fixes #2264

* move locking outside loop to avoid deadlock

* Update CHANGELOG.md
2021-09-30 15:58:26 -04:00
Lucas Käldström
c912b179fd Print JSON objects to stdout without a wrapping array (#2196)
* Encode JSON objects to stdout one by one; not wrapped in lists

* Add changelog entry
2021-08-25 08:48:48 -07:00
Lucas Käldström
add511c105 Make WithoutTimestamps work (#2195)
* Make WithoutTimestamps work

* Add changes to changelog

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com>
2021-08-23 14:29:51 -07:00
Anthony Mirabella
c30cd1d0fd Split stdout exporter into stdouttrace and stdoutmetric (#2005)
* Split stdout exporter into stdouttrace and stdoutmetric

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Remove unused options from stdouttrace and stdoutmetric exporters

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update stdout exporter references in website docs

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update docs to include correct import paths, properly describe exporter scope

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Remove pointless options to disable signals from what are now single-signal exporters

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
2021-06-16 11:32:42 -04:00