Bartlomiej Plotka
7769495a4a
refactor: switch OTLP handler to AppendableV2 ( #17996 )
...
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
* refactor: switch OTLP handler to AppendableV2
Signed-off-by: bwplotka <bwplotka@gmail.com>
* addressed comments
Signed-off-by: bwplotka <bwplotka@gmail.com>
---------
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-02-03 16:44:40 +00:00
Bartlomiej Plotka
44d772b4e7
refactor: use Appender mock for tests ( #17992 )
...
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-02-02 15:56:11 +00:00
Bartlomiej Plotka
076369fad0
refactor: move OTLP handler to separate file ( #17990 )
...
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-02-02 14:36:00 +00:00
Ben Kochie
e14795bbf4
Remove copyright date from headers ( #17785 )
...
Remove copyright dates from various files as part of [PROM-50].
[PROM-50]: https://github.com/prometheus/proposals/blob/main/proposals/0050-remove-copyright-dates.md
Signed-off-by: SuperQ <superq@gmail.com>
2026-01-05 13:46:21 +01:00
Bryan Boreham
950f756e9e
Merge remote-tracking branch 'origin/release-3.8' into merge-3.8.1-to-main
...
Tweak RW2 change for consistency with older lines.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-12-19 09:33:41 +00:00
bwplotka
cd98ded6ea
test: add regression test against remote write handler bad response stats
...
Signed-off-by: bwplotka <bwplotka@gmail.com>
2025-12-12 22:43:51 +00:00
Björn Rabenstein
b8d19543b8
Add histogram validation in remote-read and during reducing resolution ( #17561 )
...
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
ReduceResolution is currently called before validation during
ingestion. This will cause a panic if there are not enough buckets in
the histogram. If there are too many buckets, the spurious buckets are
ignored, and therefore the error in the input histogram is masked.
Furthermore, invalid negative offsets might cause problems, too.
Therefore, we need to do some minimal validation in reduceResolution.
Fortunately, it is easy and shouldn't slow things down. Sadly, it
requires to return errors, which triggers a bunch of code changes.
Even here is a bright side, we can get rud of a few panics. (Remember:
Don't panic!)
In different news, we haven't done a full validation of histograms
read via remote-read. This is not so much a security concern (as you
can throw off Prometheus easily by feeding it bogus data via
remote-read) but more that remote-read sources might be makeshift and
could accidentally create invalid histograms. We really don't want to
panic in that case. So this commit does not only add a check of the
spans and buckets as needed for resolution reduction but also a full
validation during remote-read.
Signed-off-by: beorn7 <beorn@grafana.com>
2025-11-21 00:22:24 +01:00
Bartlomiej Plotka
3bcc88b053
prw2: Move Remote Write 2.0 CT to be per Sample; Rename to ST (start timestamp) ( #17411 )
...
Relates to
https://github.com/prometheus/prometheus/issues/16944#issuecomment-3164760343
Signed-off-by: bwplotka <bwplotka@gmail.com>
(cherry picked from commit cefefc6897 )
2025-11-20 08:26:04 +00:00
Minh Nguyen
5087a25848
Remote Write Receive Fix: Remove duplicate labels when type-and-unit-label feature is on ( #17546 )
...
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
* drop extra label from receiver
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
* used constant
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
---------
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
2025-11-18 09:37:09 +00:00
Bartlomiej Plotka
cefefc6897
prw2: Move Remote Write 2.0 CT to be per Sample; Rename to ST (start timestamp) ( #17411 )
...
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Relates to
https://github.com/prometheus/prometheus/issues/16944#issuecomment-3164760343
Signed-off-by: bwplotka <bwplotka@gmail.com>
2025-11-17 14:59:40 +00:00
Bartlomiej Plotka
f50ff0a40a
feat: rename CreatedTimestamp to StartTimestamp ( #17523 )
...
Partially fixes https://github.com/prometheus/prometheus/issues/17416 by
renaming all CT* names to ST* in the whole codebase except RW2 (this is
done in separate
[PR](https://github.com/prometheus/prometheus/pull/17411 )) and
PrometheusProto exposition proto.
```
CreatedTimestamp -> StartTimestamp
CreatedTimeStamp -> StartTimestamp
created_timestamp -> start_timestamp
CT -> ST
ct -> st
```
Signed-off-by: bwplotka <bwplotka@gmail.com>
2025-11-13 14:17:51 +00:00
Minh Nguyen
7ebff91cfd
OTLP Receiver: Only update metadata to WAL when metadata-wal-records feature is enabled ( #17472 )
...
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
OTLP Receiver: Only update metadata to WAL when metadata-wal-records feature is enabled.
---------
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
2025-11-13 09:53:12 +01:00
Minh Nguyen
30992dd032
[RW2] Fix: Only update metadata to WAL when metadata-wal-records feature is enabled ( #17470 )
...
* add feature check when UpdateMetadata
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
* add appendMetadata boolean to write_hander
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
* fix
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
---------
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
2025-11-04 08:16:57 +00:00
Laurent Dufresne
7621eb772c
histogram: Add Error type for all histogram errors
...
`histogram.Error` becomes the generic wrapper type for all histogram errors.
This makes it easier and less error prone when adding new errors to check if
an error is an histogram error as well as making it less error prone to convert
the errors.
This change the type of those specific sentinel errors from error to
`histogram.Error`, but it should almost never matter.
e.g., `errors.Is(err, ErrHistogram...)` would still work out of the box.
Signed-off-by: Laurent Dufresne <laurent.dufresne@grafana.com>
2025-10-30 08:45:34 +01:00
Minh Nguyen
f070e35358
[RW]: Adopt client_golang/exp/api/remote types for receiving RW1 and RW2 ( #17197 )
...
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
# Conflicts:
# storage/remote/write_handler.go
* add comment
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
* fix
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
* fix failling test
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
* nit_fixing
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
* fix comment
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
---------
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
2025-10-24 10:31:34 +01:00
Arve Knudsen
ef42c088ba
OTLP: Add configuration parameters to control label name translation ( #17345 )
...
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
As a follow-up to #17344 , add two configuration parameters for controlling label
name translation, both defaulting to on for backwards compatibility (currently
these behaviours are hardcoded as enabled):
* otlp.label_name_underscore_sanitization => Prefix label names starting with a
single underscore with key_ when translating OTel attribute names
* otlp.label_name_preserve_multiple_underscores => Keep multiple consecutive
underscores in label names when translating OTel attribute names
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-10-22 08:27:35 +02:00
György Krajcsovits
ea398c15e8
Merge branch 'release-3.7' into krajo/merge-release-3071-to-main
2025-10-17 10:45:55 +02:00
Arve Knudsen
99d0967133
Fix lint failure
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-10-16 16:56:18 +02:00
Arve Knudsen
f5804e7cf2
Remove configuration parameters
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-10-16 16:37:24 +02:00
Arve Knudsen
dd3a607d2d
Add configuration parameters
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-10-16 16:13:08 +02:00
harsh kumar
16a9a827de
remote-write: Add type and unit labels to 2.0 receiver when feature flag enabled ( #17329 )
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Build Prometheus for common architectures (push) Has been cancelled
CI / Build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
* feat(remote): add support for type and unit labels in write handler
Signed-off-by: Harsh <harshmastic@gmail.com>
* minor fixes
Signed-off-by: Harsh <harshmastic@gmail.com>
* fix failing tests
Signed-off-by: Harsh <harshmastic@gmail.com>
* Update storage/remote/write_handler.go
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: harsh kumar <135993950+hxrshxz@users.noreply.github.com>
* Update storage/remote/write_handler.go
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: harsh kumar <135993950+hxrshxz@users.noreply.github.com>
* refactor: streamline label handling for type and unit in write handler tests
Signed-off-by: Harsh <harshmastic@gmail.com>
* test: enhance V2 message tests for type and unit labels
Signed-off-by: Harsh <harshmastic@gmail.com>
---------
Signed-off-by: Harsh <harshmastic@gmail.com>
Signed-off-by: harsh kumar <135993950+hxrshxz@users.noreply.github.com>
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
2025-10-15 18:19:41 +01:00
George Krajcsovits
fe11cae637
Merge pull request #17287 from linasm/reject-nan-histogram-custom-bounds
...
NHCB: Reject custom bucket bounds with NaN value
2025-10-06 18:11:03 +02:00
Linas Medziunas
c16db58061
NHCB: Reject custom bucket bounds with NaN value
...
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2025-10-06 16:37:28 +03:00
Minh Nguyen
106e6f2c77
[RW2] Return 400 for Exemplars without Series or Histograms not written ( #17250 )
...
* fix
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
* fix cmt
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
---------
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
2025-10-06 12:53:44 +01:00
beorn7
3d7cf4c274
model/histogram: Validate non-negative count and zero bucket
...
We have always validated that none of the bucket is negative. We
should do the same for the count of observations and the zero bucket.
Note that this was always implied in the protobuf exposition format
because a count or a zero bucket population is ignored if it is not
positive.
Signed-off-by: beorn7 <beorn@grafana.com>
2025-10-01 16:40:41 +02:00
György Krajcsovits
794c545930
Merge remote-tracking branch 'origin/main' into krajo/native-histogram-schema-validation
2025-09-23 10:51:02 +02:00
Minh Nguyen
d04550a9c4
[RW2] Return 400 error code for wrongly-formatted histograms ( #17210 )
...
* return 400 error code
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
* fix
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
* add more cases
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
* format code
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
* nit_fixing
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
---------
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
2025-09-23 07:24:46 +02:00
György Krajcsovits
bdf547ae9c
fix(nativehistograms): validation should fail on unsupported schemas
...
Histogram.Validate and FloatHistogram.Validate now return error on
unsupported schemas.
Scrape and remote-write handler reduces the schema to the maximum allowed
if it is above the maximum, but below theoretical maximum of 52.
For scrape the maximum is a configuration option, for remote-write it is 8.
Note: OTLP endpont already does the reduction, without checking that it is
below 52 as the spec does not specify a maximum.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-09-13 16:54:44 +02:00
Minh Nguyen
0fc2547740
Handle error gracefully for the desymbolizeLabels function in prompb/io/prometheus/write/v2/symbols.go ( #17160 )
...
Signed-off-by: pipiland <user123@Minhs-Macbook.local>
---------
Signed-off-by: pipiland <user123@Minhs-Macbook.local>
Co-authored-by: pipiland <user123@Minhs-Macbook.local>
2025-09-08 13:04:55 -07:00
George Krajcsovits
979aea1d49
OTLP to directly write to an interface which can hide storage details ( #16951 )
...
* OTLP writer writes directly to appender
Do not convert to Remote-Write 1.0 protocol. Convert to TSDB Appender interface instead.
For downstream projects that still convert OTLP to something else (e.g. Mimir using
its own RW 1.0+2.0 compatible protocol), introduce a compatibility layer between
OTLP decoding and TSDB Appender. This is the CombinedAppender that hides the
implementation. Name is subject to change.
---------
Signed-off-by: David Ashpole <dashpole@google.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Jesus Vazquez <jesusvazquez@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-09-08 14:34:25 +02:00
Arve Knudsen
68d0d3eee3
Remote write: Return after writing error response for invalid compression ( #17050 )
...
* Remote write: Return after writing error response for invalid compression
Fix remote write HTTP handler to return after writing error response for
invalid compression (non-Snappy).
---------
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-08-17 15:18:47 +00:00
Arve Knudsen
ae85827e3a
storage/remote.writeHandler.ServeHTTP: Return upon receiving bad message type ( #16997 )
...
Modify storage/remote.writeHandler.ServeHTTP to return after responding
with an error due to receiving an unrecognized protobuf message type.
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-08-07 19:01:03 +02:00
Matthieu MOREL
cef219c31c
chore: enable unused-receiver rule from revive
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-08-04 09:43:33 +00:00
Arthur Silva Sens
2c04f2d7b1
PROM-39: Add type and unit labels to OTLP endpoint ( #16630 )
...
* PROM-39: Add type and unit labels to OTLP endpoint
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
* Extract label addition into helper function
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
* Wire feature flag and web handler configuration
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
* Apply suggestions from code review
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
* Use lowercase for units too
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
* Use otlptranslator.UnitNamer to build units
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
* Address copilot's comment
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
* Verify label presence before adding them
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
* Overwrite type/unit labels when already set
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
* sed/addTypeAndUnitLabels/enableTypeAndUnitLabels/
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
* Reduce duplicated code
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
---------
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-07-25 08:53:13 -03:00
Arthur Silva Sens
3602785a89
Support including scope metadata as metric labels ( #16878 )
...
* Support including scope metadata as metric labels
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
* Ensure Scope Name, Version and Schema URL aren't overriden by attributes
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
---------
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2025-07-18 13:44:05 -03:00
Bryan Boreham
36ec1e4fb0
Merge branch 'main' into merge-3.5-into-main
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-07-14 15:29:00 +01:00
Owen Williams
d2f1f4fb27
config: Add UnderscoreEscapingWithoutSuffixes translation strategy ( #16849 )
...
The last permutation of the translation options does underscore translation but does not add suffixes.
This translation option already exists in Mimir as otel_metric_suffixes_enabled, indicating external demand for this strategy.
There is an accompanying update to prometheus-docs to explain the use of this mode: https://github.com/prometheus/docs/pull/2688
Signed-off-by: Owen Williams <owen.williams@grafana.com>
2025-07-10 11:27:23 -04:00
Arthur Silva Sens
4b9d0fb92f
Revert: OTLP Support including scope metadata as metric labels ( #16842 )
...
Reverts #16730 and #16760
This is being done because we've noticed a problem in the spec that could
lead to name collisions if attributes name, version or schema_url are added
to the scope. They would collide with the already reserved labels
otel_scope_name, otel_scope_version and otel_scope_schema_url.
Since this new configuration option never made it into a release, we can
safely remove it from the 3.5 release. We'll sort this out for the 3.6 release
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2025-07-08 10:37:19 +00:00
Arve Knudsen
f561aa795d
OTLP receiver: Generate target_info samples between the earliest and latest samples per resource ( #16737 )
...
* OTLP receiver: Generate target_info samples between the earliest and latest samples per resource
Modify the OTLP receiver to generate target_info samples between the earliest
and latest samples per resource instead of only one for the latest timestamp.
The samples are spaced lookback delta/2 apart.
---------
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-07-04 14:38:16 +00:00
Arve Knudsen
c701636034
OTLP receiver: Rename otlp.convert_scope_metadata to otlp.promote_scope_metadata ( #16760 )
...
* Rename otlp.convert_scope_metadata to otlp.promote_scope_metadata
---------
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Julius Hinze <juliusmh@proton.me>
2025-06-20 13:09:02 +00:00
Arve Knudsen
964bd7d1a9
OTLP: Support including scope metadata as metric labels ( #16730 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-06-18 09:13:51 +02:00
Antonio Jimenez
2834a665ed
Add support for promoting all OTel resource attributes ( #16426 )
...
Add support for promoting all OTel resource attributes via `promote_all_resource_attributes`,
except for those ignored using 'ignore_resource_attributes'.
---------
Signed-off-by: Antonio Jimenez <antonjim@thousandEyes.com>
Signed-off-by: Antonio Jimenez <123171955+antonjim-te@users.noreply.github.com>
2025-05-26 18:15:01 +02:00
Fiona Liao
7ec63b1fa1
Add primitive support for ingesting OTLP delta metrics as-is ( #16360 )
...
* Add simple delta support
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Rename delta2cumulative part
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Whoops bad refactor
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Add example yml
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Feature flag instead and histogram hint handling
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Delete otel_delta.yml - outdated
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Renaming to native delta support
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Add more explanatory comments
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Add more explanation to histograms
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Correct comment on d2c consumer
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Add tests for counters and fix bug
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Add histogram tests
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Add docs
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Sort series to make test deterministic
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* More formatting
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Change flag name to ingestion
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Explain where rate calculation can go wrong
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Add warning about duplicate timestamps
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Update docs/feature_flags.md
Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Fix tests
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Remove unnecessary if
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Add warning to d2c section
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Make unknown type error when getting temporality
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Correct type comment - not planning to add delta metric metadata type
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Remove unused param for empty type
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Rewrite temporality logic to be clearer
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
* Change spurious to unnecessary - better description
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
---------
Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
2025-04-23 09:58:02 -03:00
Arthur Silva Sens
d9c0ad1e61
feat: Support 'NoTranslation' mode in OTLP endpoint ( #16441 )
...
* feat: Support 'NoTranslation' mode in OTLP endpoint
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
---------
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2025-04-22 13:13:30 -03:00
Matthieu MOREL
5fa1146e21
chore: enable gci linter ( #16245 )
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-03-22 15:46:13 +00:00
Carrie Edwards
c90b387d89
Optionally translate OTel histograms to NHCB ( #15850 )
...
* Optionally translate OTEL histograms to NHCB
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
* Add tests for explicit histogram to NHCB translation
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
* Linting
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
* Add test for translation with flag
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
* Refactor to re-use bucket conversion function
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
* Update prompb
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
* Add comment explaining explicit bounds and use defined CustomBucketSchema
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
* Add TODO for limiting max bucket count
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
* Fix imports and remove extra blank line
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
* Update configuration docs and CHANGELOG
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
* Update CHANGELOG
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
* Use otlptranslator package
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
---------
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
2025-03-20 09:18:51 -07:00
Owen Williams
94b43c5d4c
utf8: Remove support for legacy global validation setting
...
Global and Data Source configurations can specify legacy mode, but Prometheus now requires that the overall validation mode be set to UTF-8
Signed-off-by: Owen Williams <owen.williams@grafana.com>
2025-03-13 10:47:24 -04:00
Bartlomiej Plotka
7a7bc65237
Add util/compression package to consolidate snappy/zstd use in Prometheus. ( #16156 )
...
# Conflicts:
# tsdb/db_test.go
Apply suggestions from code review
tmp
Addressed comments.
Update util/compression/buffers.go
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
2025-03-10 10:36:26 +00:00
dependabot[bot]
da0412a519
chore(deps): bump the go-opentelemetry-io group across 1 directory with 14 updates ( #16181 )
...
* chore(deps): bump the go-opentelemetry-io group across 1 directory with 14 updates
Bumps the go-opentelemetry-io group with 8 updates in the / directory:
| Package | From | To |
| --- | --- | --- |
| [go.opentelemetry.io/collector/component](https://github.com/open-telemetry/opentelemetry-collector ) | `0.118.0` | `1.27.0` |
| [go.opentelemetry.io/collector/consumer](https://github.com/open-telemetry/opentelemetry-collector ) | `1.24.0` | `1.27.0` |
| [go.opentelemetry.io/collector/processor](https://github.com/open-telemetry/opentelemetry-collector ) | `0.118.0` | `0.121.0` |
| [go.opentelemetry.io/collector/semconv](https://github.com/open-telemetry/opentelemetry-collector ) | `0.118.0` | `0.121.0` |
| [go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace](https://github.com/open-telemetry/opentelemetry-go-contrib ) | `0.59.0` | `0.60.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace](https://github.com/open-telemetry/opentelemetry-go ) | `1.34.0` | `1.35.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://github.com/open-telemetry/opentelemetry-go ) | `1.34.0` | `1.35.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://github.com/open-telemetry/opentelemetry-go ) | `1.34.0` | `1.35.0` |
Updates `go.opentelemetry.io/collector/component` from 0.118.0 to 1.27.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-collector/releases )
- [Changelog](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG-API.md )
- [Commits](https://github.com/open-telemetry/opentelemetry-collector/compare/v0.118.0...pdata/v1.27.0 )
Updates `go.opentelemetry.io/collector/consumer` from 1.24.0 to 1.27.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-collector/releases )
- [Changelog](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG-API.md )
- [Commits](https://github.com/open-telemetry/opentelemetry-collector/compare/pdata/v1.24.0...pdata/v1.27.0 )
Updates `go.opentelemetry.io/collector/pdata` from 1.24.0 to 1.27.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-collector/releases )
- [Changelog](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG-API.md )
- [Commits](https://github.com/open-telemetry/opentelemetry-collector/compare/pdata/v1.24.0...pdata/v1.27.0 )
Updates `go.opentelemetry.io/collector/processor` from 0.118.0 to 0.121.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-collector/releases )
- [Changelog](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG-API.md )
- [Commits](https://github.com/open-telemetry/opentelemetry-collector/compare/v0.118.0...v0.121.0 )
Updates `go.opentelemetry.io/collector/semconv` from 0.118.0 to 0.121.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-collector/releases )
- [Changelog](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG-API.md )
- [Commits](https://github.com/open-telemetry/opentelemetry-collector/compare/v0.118.0...v0.121.0 )
Updates `go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace` from 0.59.0 to 0.60.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases )
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md )
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.59.0...zpages/v0.60.0 )
Updates `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` from 0.59.0 to 0.60.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases )
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md )
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.59.0...zpages/v0.60.0 )
Updates `go.opentelemetry.io/otel` from 1.34.0 to 1.35.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases )
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md )
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.34.0...v1.35.0 )
Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace` from 1.34.0 to 1.35.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases )
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md )
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.34.0...v1.35.0 )
Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` from 1.34.0 to 1.35.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases )
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md )
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.34.0...v1.35.0 )
Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` from 1.34.0 to 1.35.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases )
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md )
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.34.0...v1.35.0 )
Updates `go.opentelemetry.io/otel/metric` from 1.34.0 to 1.35.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases )
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md )
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.34.0...v1.35.0 )
Updates `go.opentelemetry.io/otel/sdk` from 1.34.0 to 1.35.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases )
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md )
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.34.0...v1.35.0 )
Updates `go.opentelemetry.io/otel/trace` from 1.34.0 to 1.35.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases )
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md )
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.34.0...v1.35.0 )
---
updated-dependencies:
- dependency-name: go.opentelemetry.io/collector/component
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: go-opentelemetry-io
- dependency-name: go.opentelemetry.io/collector/consumer
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: go-opentelemetry-io
- dependency-name: go.opentelemetry.io/collector/pdata
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: go-opentelemetry-io
- dependency-name: go.opentelemetry.io/collector/processor
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: go-opentelemetry-io
- dependency-name: go.opentelemetry.io/collector/semconv
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: go-opentelemetry-io
- dependency-name: go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: go-opentelemetry-io
- dependency-name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: go-opentelemetry-io
- dependency-name: go.opentelemetry.io/otel
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: go-opentelemetry-io
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: go-opentelemetry-io
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: go-opentelemetry-io
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: go-opentelemetry-io
- dependency-name: go.opentelemetry.io/otel/metric
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: go-opentelemetry-io
- dependency-name: go.opentelemetry.io/otel/sdk
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: go-opentelemetry-io
- dependency-name: go.opentelemetry.io/otel/trace
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: go-opentelemetry-io
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix creating of metrics processor
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-03-07 18:05:32 +01:00
co63oc
0e4e5a71bd
Fix typos ( #16076 )
...
Signed-off-by: co63oc <co63oc@users.noreply.github.com>
2025-02-28 11:24:25 +11:00