Tyler Yahn
5b5c2c5d6d
Upgrade to semconv/v1.40.0 ( #7991 )
2026-03-04 12:13:40 +01:00
Saharsh Tibrewala
61f0e4855c
Bump semconv from v1.37.0 to v1.39.0 ( #7789 )
...
Fixes #7788
---------
Co-authored-by: Damien Mathieu <42@dmathieu.com >
2026-01-21 10:42:41 +01:00
Dave Protasowski
dee11e6ae3
Add temporality selector functions ( #7434 )
...
From: https://github.com/open-telemetry/opentelemetry-go/pull/7346
This PR exposes the default TemporalitySelector funcs that are used by
the OTel env var processing.
The reason to expose these funcs is because there is some discrepancy in
various vendor documentation on how to enable these settings using go
option args WithTemporalitySelector
https://cloud-native.slack.com/archives/C01NPAXACKT/p1757443233624599
---------
Co-authored-by: Damien Mathieu <42@dmathieu.com >
Co-authored-by: David Ashpole <dashpole@google.com >
2025-10-02 16:13:59 +02:00
Tyler Yahn
6180f833bc
Return partial OTLP export errors to the caller ( #7372 )
...
Fix #7370
Do not pass relevant errors for the operation of the export to the
`otel.ErrorHandler`. Instead, include them in the error returned to the
caller.
2025-09-18 13:08:25 -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
4b2bef6dd9
[chore] Upgrade semconv pkg use to v1.36.0 ( #7237 )
...
Fix #7236
2025-08-25 16:33:34 +02:00
Matt Quinn
1636bcdd1d
fix(otlptrace,otlpmetric): remove endpoint URL path cleaning ( #6710 )
...
When setting an explicit OTLP traces endpoint URL (via
`otlptracehttp.WithEndpointURL` or the
`OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` environment variable), any given
trailing slash is stripped. This makes it impossible to export traces to
an endpoint requiring a trailing slash. It also conflicts with [the
spec](https://opentelemetry.io/docs/specs/otel/protocol/exporter/#endpoint-urls-for-otlphttp ):
> For the per-signal variables (OTEL_EXPORTER_OTLP_\<signal\>_ENDPOINT),
the URL MUST be used as-is without any modification. The only exception
is that if an URL contains no path part, the root path / MUST be used
(see [Example
2](https://opentelemetry.io/docs/specs/otel/protocol/exporter/#example-2 )).
This stripping happens due to [the use of `path.Clean` in
`otlpconfig.cleanPath`](https://github.com/open-telemetry/opentelemetry-go/blob/b4b461d050f1d0f5bda89ddac718180162120606/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options.go#L97 ).
From [the `path.Clean` docs](https://pkg.go.dev/path#Clean ):
> The returned path ends in a slash only if it is the root "/".
Fixes #6709 .
2025-06-03 07:12:49 +02:00
Tyler Yahn
bf8af6f113
Upgrade semconv to v1.34.0 for OTLP templates ( #6828 )
2025-05-28 10:05:46 -07:00
Robert Pająk
b66542529a
otlpmetrichttp: Add WithHTTPClient option ( #6752 )
...
Follows https://github.com/open-telemetry/opentelemetry-go/pull/6688
Towards (for OTLP metric exporter):
- https://github.com/open-telemetry/opentelemetry-go/issues/4536
- https://github.com/open-telemetry/opentelemetry-go/issues/5129
- https://github.com/open-telemetry/opentelemetry-go/issues/2632
2025-05-13 20:58:06 +02:00
Sean Liao
1d8824889c
all: match go conventions for generated code ( #6731 )
...
Go documents the following regex pattern
for identifying generated code:
^// Code generated .* DO NOT EDIT\.$
This convention is used go APIs and tooling.
References:
https://pkg.go.dev/go/ast#IsGenerated
https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source
Co-authored-by: Damien Mathieu <42@dmathieu.com >
2025-05-05 09:41:12 +02: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
renovate[bot]
590bcee71b
fix(deps): update module github.com/golangci/golangci-lint to v2 ( #6499 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/golangci/golangci-lint](https://redirect.github.com/golangci/golangci-lint )
| `v1.64.8` -> `v2.0.2` |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
### Release Notes
<details>
<summary>golangci/golangci-lint
(github.com/golangci/golangci-lint)</summary>
###
[`v2.0.2`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v202 )
[Compare
Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.0.1...v2.0.2 )
1. Misc.
- Fixes flags parsing for formatters
- Fixes the filepath used by the exclusion `source` option
2. Documentation
- Adds a section about flags migration
- Cleaning pages with v1 options
###
[`v2.0.1`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v201 )
[Compare
Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.0.0...v2.0.1 )
1. Linters/formatters bug fixes
- `golines`: fix settings during linter load
2. Misc.
- Validates the `version` field before the configuration
- `forbidigo`: fix migration
###
[`v2.0.0`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v200 )
[Compare
Source](https://redirect.github.com/golangci/golangci-lint/compare/v1.64.8...v2.0.0 )
1. Enhancements
- 🌟 New `golangci-lint fmt` command with dedicated formatter
configuration
(https://golangci-lint.run/welcome/quick-start/#formatting )
- ♻️ New `golangci-lint migrate` command to help migration from v1 to v2
(cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/#command-migrate ))
- ⚠️ New default values (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/ ))
- ⚠️ No exclusions by default (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/#issuesexclude-use-default ))
- ⚠️ New default sort order (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/#outputsort-order ))
- 🌟 New option `run.relative-path-mode` (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/#runrelative-path-mode ))
- 🌟 New linters configuration (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/#linters ))
- 🌟 New output format configuration (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/#output ))
- 🌟 New `--fast-only` flag (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/#lintersfast ))
- 🌟 New option `linters.exclusions.warn-unused` to log a warning if an
exclusion rule is unused.
2. New linters/formatters
- Add `golines` formatter https://github.com/segmentio/golines
3. Linters new features
- ⚠️ Merge `staticcheck`, `stylecheck`, `gosimple` into one linter
(`staticcheck`) (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/#lintersenablestylecheckgosimplestaticcheck ))
- `go-critic`: from 0.12.0 to 0.13.0
- `gomodguard`: from 1.3.5 to 1.4.1 (block explicit indirect
dependencies)
- `nilnil`: from 1.0.1 to 1.1.0 (new option: `only-two`)
- `perfsprint`: from 0.8.2 to 0.9.1 (checker name in the diagnostic
message)
- `staticcheck`: new `quickfix` set of rules
- `testifylint`: from 1.5.2 to 1.6.0 (new options: `equal-values`,
`suite-method-signature`, `require-string-msg`)
- `wsl`: from 4.5.0 to 4.6.0 (new option: `allow-cuddle-used-in-block`)
4. Linters bug fixes
- `bidichk`: from 0.3.2 to 0.3.3
- `errchkjson`: from 0.4.0 to 0.4.1
- `errname`: from 1.0.0 to 1.1.0
- `funlen`: fix `ignore-comments` option
- `gci`: from 0.13.5 to 0.13.6
- `gosmopolitan`: from 1.2.2 to 1.3.0
- `inamedparam`: from 0.1.3 to 0.2.0
- `intrange`: from 0.3.0 to 0.3.1
- `protogetter`: from 0.3.9 to 0.3.12
- `unparam`: from
[`8a5130c`](https://redirect.github.com/golangci/golangci-lint/commit/8a5130ca722f )
to
[`0df0534`](https://redirect.github.com/golangci/golangci-lint/commit/0df0534333a4 )
5. Misc.
- 🧹 Configuration options renaming (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/ ))
- 🧹 Remove options (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/ ))
- 🧹 Remove flags (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/ ))
- 🧹 Remove alternative names (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/#alternative-linter-names ))
- 🧹 Remove or replace deprecated elements (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/ ))
- Adds an option to display some commands as JSON:
- `golangci-lint config path --json`
- `golangci-lint help linters --json`
- `golangci-lint help formatters --json`
- `golangci-lint linters --json`
- `golangci-lint formatters --json`
- `golangci-lint version --json`
6. Documentation
- [Migration guide](https://golangci-lint.run/product/migration-guide/ )
</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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com >
2025-03-26 10:46:44 -07:00
Matthieu MOREL
74937a2952
[chore]: enable all rules of perfsprint ( #5978 )
...
#### Description
[perfsprint](https://github.com/catenacyber/perfsprint ) is a linter for
performance, aiming at usages of fmt.Sprintf which have faster
alternatives.
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2024-11-18 10:04:50 +01:00
Damien Mathieu
2c15a77942
Fix lint issues for golangci-lint 1.62.0 ( #5967 )
...
This fixes the new lint issues brough by the golangci-lint upgrade in
https://github.com/open-telemetry/opentelemetry-go/pull/5966
2024-11-13 08:58:59 +01:00
Seva Orlov
b62a3fdd25
Override insecure when endpoint URL is set ( #5944 )
...
When an endpoint is set in both Environment variable with "http" and
passed in WithEndpointURL with "https", Insecure is set to true while
the endpoint is used from WithEndpointURL.
Example
- OTEL_EXPORTER_OTLP_ENDPOINT is set to "http://env.endpoint/prefix "
- WithEndpointURL is passed "https://someendpoint/somepath "
The real endpoint used is "http://someendpoint/somepath ", which is
actually neither of both.
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com >
2024-11-07 13:50:10 +01:00
Robert Pająk
afd1311f3e
otlpmetric: Add instrumentation scope attributes ( #5935 )
...
Towards https://github.com/open-telemetry/opentelemetry-go/issues/5844
2024-10-31 11:34:44 +01:00
Tyler Yahn
86a51dc049
[chore] Remove unnecessary type declaration in templated transforms ( #5906 )
...
The type is fully defined by the switch, no need to be redundant.
2024-10-22 16:06:26 -07: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
Matthieu MOREL
d284a86fa5
[chore]: enable error-nil rule from testifylint ( #5843 )
...
Testifylint is a linter that provides best practices with the use of
testify.
This PR enables
[error-nil](https://github.com/Antonboom/testifylint?tab=readme-ov-file#error-nil )
rule from [testifylint](https://github.com/Antonboom/testifylint )
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
Co-authored-by: Robert Pająk <pellared@hotmail.com >
2024-09-25 11:07:59 +02:00
Matthieu MOREL
063239fa37
[chore]: enable len and empty rules from testifylint ( #5832 )
...
#### Description
Testifylint is a linter that provides best practices with the use of
testify.
This PR enables
[empty](https://github.com/Antonboom/testifylint?tab=readme-ov-file#empty )
and
[len](https://github.com/Antonboom/testifylint?tab=readme-ov-file#len )
rules from [testifylint](https://github.com/Antonboom/testifylint )
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2024-09-21 08:04:28 -07:00
Matthieu MOREL
aef9e4fa2f
[chore]: enable bool-compare rule from testifylint ( #5829 )
...
#### Description
Testifylint is a linter that provides best practices with the use of
testify.
This PR enables
[bool-compare](https://github.com/Antonboom/testifylint?tab=readme-ov-file#bool-compare )
rule from [testifylint](https://github.com/Antonboom/testifylint )
It's linter provided by golangci-lint.
Here all available rules are activated except those who require to be
fixed. This PR only fixes bool-compare so the quantity of changes stays
reasonnable for reviewers.
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
Co-authored-by: Damien Mathieu <42@dmathieu.com >
2024-09-20 09:39:27 +02:00
Damien Mathieu
a3c512aa95
Fix gosec overflow alerts ( #5799 )
...
To allow the golangci-lint upgrade in #5796 .
---------
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
2024-09-13 09:11:50 +02:00
Nathan Baulch
506a9baf5e
Fix typos ( #5763 )
2024-09-09 08:53:15 +02:00
Sam Xie
48f6a11b75
Correct the comment for the priority of options and environments on otlpmetric ( #5641 )
...
Part of https://github.com/open-telemetry/opentelemetry-go/issues/5379
2024-07-24 18:42:37 -07:00
Damien Mathieu
8f965b6b85
Add resource metrics transform benchmarks ( #5602 )
...
Co-authored-by: David Ashpole <dashpole@google.com >
2024-07-12 09:38:29 +02:00
Damien Mathieu
6d45f283c7
Add errorlint linter ( #5535 )
...
This is the last PR adding missing linters, adding
[errorlint](https://github.com/polyfloyd/go-errorlint ).
Co-authored-by: Sam Xie <sam@samxie.me >
2024-06-25 10:55:00 -07:00
Damien Mathieu
3e91436a3b
Add unconvert linter ( #5529 )
...
This adds the unconvert linter, and fixes every new issue related to it.
Co-authored-by: Sam Xie <sam@samxie.me >
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
2024-06-21 15:00:26 -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
Sam Xie
bf37c5a3a4
Revert the usage of go.opentelemetry.io/proto/slim ( #5253 )
...
* Revert "otlpmetrichttp: Use go.opentelemetry.io/proto/slim/otlp (#5222 )"
This reverts commit 6e92163d6a .
* Revert "otlploghttp: Use go.opentelemetry.io/proto/slim/otlp (#5216 )"
This reverts commit fe3de7059e .
* Remove slim dep
* Fix CI
2024-04-23 07:12:25 +02:00
Robert Pająk
6e92163d6a
otlpmetrichttp: Use go.opentelemetry.io/proto/slim/otlp ( #5222 )
2024-04-22 13:07:29 +02:00
David Ashpole
540663b064
add summary support to the OTLP exporter ( #5100 )
...
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com >
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
2024-03-25 08:15:02 -07:00
Mickael Alliel
9a515ceb74
otlptracehttp, otlpmetrichttp: Add WithProxy option ( #4906 )
2024-03-12 11:04:06 +01:00
Robert Pająk
7dea232a46
[chore] Simplify the license header ( #4987 )
2024-02-29 07:05:28 +01:00
David Ashpole
ec03021ff0
add exemplar support to the OTLP HTTP and gRPC exporters ( #4900 )
2024-02-12 07:31:18 -08:00
Damien Mathieu
33f5cf460b
Add WithEndpointURL option to OTLP over HTTP exporters ( #4808 )
...
Co-authored-by: Robert Pająk <pellared@hotmail.com >
2024-01-19 15:25:10 +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
8ceba1368a
otlpmetrichttp otlptracehttp: Do not parse non-protobuf reponses ( #4719 )
2023-11-16 18:33:54 +01:00
Robert Pająk
437bc82bc4
otlptracegrpc otlpmetricgrpc: Remove redundant append of DialOptions ( #4684 )
2023-11-02 07:49:10 +01:00
Robert Pająk
d18277e3c6
Decouple otlpmetricgrpc and otlpmetrichttp from otlpmetric ( #4660 )
2023-10-24 14:20:46 +02:00
Robert Pająk
5b28921940
[chore] Add gosec via golangci-lint ( #4645 )
2023-10-19 08:47:07 +02: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
3904523917
Flatten sdk/metric/aggregation into sdk/metric ( #4435 )
...
* Deprecate the aggregation pkg
* Decouple the internal/aggregate from aggregation pkg
* Add Aggregation to the metric pkg
* Do not use sdk/metric/aggregation in stdoutmetric exporter
* Update all generated templates
* Update prom exporter
* Fix view example
* Add changes to changelog
* Update CHANGELOG.md
Co-authored-by: Robert Pająk <pellared@hotmail.com >
* Rename Sum to AggregationSum
* Fix comments
* Centralize validation of aggregation in pipeline
* Remove validation of agg in manual_reader selector opt
* Fix merge
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com >
2023-08-14 08:15:15 -07:00
Tyler Yahn
199dc34a09
Support default histogram selection in OTLP exporter ( #4437 )
...
* Support default histogram selection in OTLP exporter
* Add changes to changelog
2023-08-14 07:21:04 -07: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
Tyler Yahn
f67ecb35dc
Decouple otlp/otlpmetric/otlpmetricgrpc from otlp/internal and otlp/otlpmetric/internal using gotmp ( #4404 )
...
* Add shared otlpmetric templates
* Generate otlpmetricgrpc/internal with gotmpl
* Use local internal in otlpmetricgrpc
* Add decoupling change to changelog
2023-08-03 17:08:49 -07:00