Commit Graph

96 Commits

Author SHA1 Message Date
Pablo Baeyens c1af501cf7
[connector,exporter,processor,receiver] Error out on mismatched type (#12381)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

<!-- Issue number if applicable -->

Error out on mismatched type for all component kinds. Same as #12305 but
for all component kinds.

#### Link to tracking issue

Requires #12357
Fixes #12221
2025-02-27 12:24:18 +00:00
Chao Weng 6de29ce169 Add `component.Type` parameter to `NewNopSettings` And deprecate `NewNopSettingsWithType` (#12452)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Add `component.Type` parameter to `NewNopSettings` And deprecate
`NewNopSettingsWithType` cc @mx-psi

<!-- Issue number if applicable -->
#### Link to tracking issue
Relevant to #12305 

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Updated

<!--Describe the documentation added.-->
#### Documentation
Added

<!--Please delete paragraphs that you did not use before submitting.-->
2025-02-21 11:17:45 +00:00
Pablo Baeyens a4ae175111
[*test] Add NewNopSettingsWithType everywhere (#12357)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

<!-- Issue number if applicable -->

Creates `NewNopSettingsWithType` function on test modules and deprecates
the `NewNopSettings` functions on those modules. Replace all usages of
`NewNopSettings` with `NewNopSettingsWithType`.

Part of #12305 but applied to all component kinds.

#### Link to tracking issue
Updates #12221
2025-02-13 16:56:20 +00:00
Bogdan Drutu d9b97ffb43
[metadatatest] Generate NewSettings that accepts componenttest.Telemetry (#12216)
This is the last functionality needed to replace
`metadatatest.Telemetry` with `componenttest.Telemetry`.

The `metadatatest.Telemetry` will be deprecated next release to give
time to change contrib since it is a large change.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-01-30 21:42:20 +00:00
Chao Weng 356e5a6e26
[chore] Replace AssertMetrics with AssertEqualMetric series functions (#12184)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
A follow-up PR of #12179 , cc @bogdandrutu 

Note: This PR also removes those metric assertions which is actually
testing metrics that doesn't belong to the package. They might be added
due to the limitation of the AssertMetrics function. e.g. changes in
`processor/memorylimitprocessor/memorylimiter_test.go`

<!-- Issue number if applicable -->
#### Link to tracking issue
Relevant to #12179 

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Updated

<!--Describe the documentation added.-->
#### Documentation
n/a

<!--Please delete paragraphs that you did not use before submitting.-->
2025-01-26 23:00:59 +00:00
Pablo Baeyens b844bb7146
[cmd/mdatagen] Remove level field from metrics (#12145)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
<!-- Issue number if applicable -->

Removes `level` field. This will be added back in the future once #11754
is completed.

#### Link to tracking issue

Updates #11061
2025-01-22 14:09:03 +00:00
Bogdan Drutu 306c939415
Deprecate component_test in favor of metadatatest (#11812)
The main idea behind this is that the test helpers were generated in the
main package, hard to find and understand and also impossible to use
outside the main package, see the
[service/internal/proctelemetry/process_telemetry_test.go](https://github.com/open-telemetry/opentelemetry-collector/compare/main...bogdandrutu:opentelemetry-collector:dep-comp-test?expand=1#diff-ed642eb1c968a9308a07e87292f77af1e0830a7af2d87111c5abacde4fc87446).

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-01-06 18:06:46 +00:00
Matthieu MOREL 824c9f7a43
[chore]: enable gofumpt linter in internal, otelcol, pdata, pipeline and processor (#11855)
#### Description

[gofumpt](https://golangci-lint.run/usage/linters/#gofumpt) is a
stricter format than gofmt, while being backwards compatible.

---------

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-12-12 19:21:54 +00:00
Bogdan Drutu 8e522ad950
Revert public API changes in #10931, preserve logic (#11415)
This PR removes APIs that expose `configtelemetry.Level`. Internal
functionality still uses the Level, but will be soon changed to use the
new Instrument.Enabled.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-11-15 16:49:51 -08:00
renovate[bot] 168a881b3c
fix(deps): update module github.com/golangci/golangci-lint to v1.62.0 (#11644)
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.61.0` -> `v1.62.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgolangci%2fgolangci-lint/v1.62.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgolangci%2fgolangci-lint/v1.62.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgolangci%2fgolangci-lint/v1.61.0/v1.62.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgolangci%2fgolangci-lint/v1.61.0/v1.62.0?slim=true)](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>golangci/golangci-lint
(github.com/golangci/golangci-lint)</summary>

###
[`v1.62.0`](https://redirect.github.com/golangci/golangci-lint/compare/v1.61.0...v1.62.0)

[Compare
Source](https://redirect.github.com/golangci/golangci-lint/compare/v1.61.0...v1.62.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, 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-collector).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS45LjUiLCJ1cGRhdGVkSW5WZXIiOiIzOS45LjUiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyIsInJlbm92YXRlYm90Il19-->

---------

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
Co-authored-by: Yang Song <songy23@users.noreply.github.com>
Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
Co-authored-by: Yang Song <yang.song@datadoghq.com>
2024-11-13 12:15:45 -08:00
Matthieu MOREL e053173aed
[chore]: enable perfsprint linter (#11599)
#### Description

[perfsprint](https://golangci-lint.run/usage/linters/#perfsprint) checks
that fmt.Sprintf can be replaced with a faster alternative.

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-11-05 14:37:07 -08:00
Bogdan Drutu 403c782d50
[chore] Remove unnecessary context from Batch.split (#11504)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-10-21 16:58:09 -07:00
Bogdan Drutu 8f20a07847
[chore] Small nits in batch processor, use generics to avoid type conversions (#11501)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-10-21 16:21:33 -07:00
renovate[bot] 49f657f6a7
fix(deps): update module github.com/golangci/golangci-lint to v1.61.0 (#10935)
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.60.1` -> `v1.61.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgolangci%2fgolangci-lint/v1.61.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgolangci%2fgolangci-lint/v1.61.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgolangci%2fgolangci-lint/v1.60.1/v1.61.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgolangci%2fgolangci-lint/v1.60.1/v1.61.0?slim=true)](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>golangci/golangci-lint
(github.com/golangci/golangci-lint)</summary>

###
[`v1.61.0`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1610)

[Compare
Source](https://redirect.github.com/golangci/golangci-lint/compare/v1.60.3...v1.61.0)

1.  Enhancements
    -   Add `junit-xml-extended` format
    -   Exclude Swagger Codegen files by default
2.  Updated linters
    -   `dupword`: from 0.0.14 to 0.1.1
    -   `fatcontext`: from 0.4.0 to 0.5.2
    -   `gci`: from 0.13.4 to 0.13.5 (new option `no-lex-order`)
- `go-ruleguard`: from 0.4.2 to
[`0fe6f58`](https://redirect.github.com/golangci/golangci-lint/commit/0fe6f58b47b1)
(fix panic with custom linters)
    -   `godot`: from 1.4.16 to 1.4.17
    -   `gomodguard`: from 1.3.3 to 1.3.5
    -   `gosec`: disable temporarily `G407`
- `gosec`: from
[`ab3f6c1`](https://redirect.github.com/golangci/golangci-lint/commit/ab3f6c1c83a0)
to 2.21.2 (partially fix `G115`)
    -   `intrange`: from 0.1.2 to 0.2.0
    -   `nolintlint`: remove the empty line in the directive replacement
3.  Misc.
    -   Improve runtime version parsing
4.  Documentation
    -   Add additional info about `typecheck`

###
[`v1.60.3`](https://redirect.github.com/golangci/golangci-lint/compare/v1.60.2...v1.60.3)

[Compare
Source](https://redirect.github.com/golangci/golangci-lint/compare/v1.60.2...v1.60.3)

###
[`v1.60.2`](https://redirect.github.com/golangci/golangci-lint/compare/v1.60.1...v1.60.2)

[Compare
Source](https://redirect.github.com/golangci/golangci-lint/compare/v1.60.1...v1.60.2)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, 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-collector).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMTE1LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyIsInJlbm92YXRlYm90Il19-->

---------

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-10-12 16:13:55 -07:00
Bogdan Drutu 98230db9d3
Deprecate funcs that repeate processor in name (#11310)
Similar with
https://github.com/open-telemetry/opentelemetry-collector/pull/11287

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-09-30 15:31:44 -07:00
Joshua MacDonald c3bd972e1a
Refactor batch processor export method (#11309)
#### Description

Split the internal `batcher.export()` interface into three methods. This
is a refactoring that was applied in
https://github.com/open-telemetry/otel-arrow/tree/main/collector/processor/concurrentbatchprocessor
and is being back-ported as part of #11308. The reason this refactoring
is needed is that the parent context of the export() request will be
manipulated in common code (vs signal-specific code) for tracing
support.

#### Link to tracking issue
Part of #11308

#### Testing
Existing tests cover this.

---------

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-09-30 15:06:09 -07:00
Matthieu MOREL aba139c2cb
[chore]: use ErrorContains and EqualError (#11295)
#### Description

Testifylint doesn't support it yet. 
This replaces `Contains(t, err.Error()` by `ErrorContains(t, err` and
`Equal(t, err.Error()` by `EqualError(t, err`
As they both check for nil error it becomes useless to check it yourself
without having defined a custom message

<!-- Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com> -->

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-09-28 08:06:09 -07:00
Matthieu MOREL 37f783308e
[chore]: enable require-error rule from testifylint (#11199)
#### Description

Testifylint is a linter that provides best practices with the use of
testify.

This PR enables
[require-error](https://github.com/Antonboom/testifylint?tab=readme-ov-file#require-error)
rule from [testifylint](https://github.com/Antonboom/testifylint)

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-09-18 15:02:22 -07:00
Matthieu MOREL 6925a306fa
[chore]: enable len and empty rules from testifylint (#11021)
#### Description

Testifylint is a linter that provides best practices with the use of
testify.

This PR enables
[len](https://github.com/Antonboom/testifylint?tab=readme-ov-file#len)
and
[empty](https://github.com/Antonboom/testifylint?tab=readme-ov-file#empty)
rules from [testifylint](https://github.com/Antonboom/testifylint)

It also adds testifylint as tool to use with a make command

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-09-09 09:57:58 -07:00
Curtis Robert 3f4f0d082d
[batchprocessor] Update metric units (#10658)
#### Description
`1` isn't an informative metric unit. I've made a best-guess attempt at
updating metric units, f**eedback is very necessary here**, the units
are not very clear here. I attempted to match the unit with metric
descriptions.

[Semantic conventions for
reference](https://opentelemetry.io/docs/specs/semconv/general/metrics/).

#### Link to tracking issue
Fixes
https://github.com/open-telemetry/opentelemetry-collector/issues/10652
2024-08-13 10:50:27 -07:00
Alex Boten 5753a58f71
update all metrics to include otelcol_ prefix (#9759)
This ensures the consistency for folks emitting metrics w/ OTLP until
the OTEP to specify pipeline telemetry is completed.

Waiting on
https://github.com/open-telemetry/opentelemetry-collector/pull/9775
before moving this forward

Fixes #9315

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-07-16 16:18:37 -07:00
Alex Boten 9907ba50df
[processor] deprecate CreateSettings -> Settings (#10336)
This deprecates CreateSettings in favour of Settings.
NewNopCreateSettings is also being deprecated in favour of
NewNopSettings
    
Part of #9428

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-06-06 09:34:53 -07:00
Alex Boten 8da8d0a27d
[chore] update batch processor tests to use generated utility (#10256)
This updates the tests for the batch processor. This allows us to remove
a bunch of custom test code.

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-05-29 13:48:42 -07:00
Alex Boten 567a175ed9
[batchprocessor] ensure attributes are set on metadata metric (#10245)
Fixing this bug required a change in mdatagen to ensure attributes could
be passed in to the telemetry builder.
    
Fixes #9674

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-05-29 09:10:01 -07:00
Alex Boten 1d8c53ff0f
[batchprocessor] use mdatagen for async metric (#10233)
Follows
https://github.com/open-telemetry/opentelemetry-collector/pull/10232,
use mdatagen for async counter

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-05-28 11:15:55 -07:00
Alex Boten fc28929061
move internal/testdata to pdata/testdata (#9885)
This reduces dependencies from the consumer package while making
testdata available across repos. It will allow us to remove duplicated
code and its a fairly small surface area.

Fixes
https://github.com/open-telemetry/opentelemetry-collector/issues/9886

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-04-08 08:36:57 -07:00
Alex Boten 834413537b
[telemetry] mark useOtelForInternalMetrics stable (#9102)
This marks the flag as stable. Leaving this as a draft until v0.92.0 is
released.

Closes https://github.com/open-telemetry/opentelemetry-collector/issues/8962
Fixes https://github.com/open-telemetry/opentelemetry-collector/issues/816

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
2024-01-16 15:38:21 -08:00
Curtis Robert fbfbe04fbd
[chore][processor/batchprocessor] Enable goleak check (#9224)
**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
Add `goleak` to detect leaks in tests. Leaking goroutines were detected
that were caused by a dependency that we can ignore
(`go.opencensus.io/stats/view.(*worker).start`), some `Shutdown` calls
were also added that were missing.

**Link to tracking Issue:** <Issue number if applicable>
#9165 

**Testing:** <Describe what testing was performed and which tests were
added.>
Added check is passing as well as existing tests.
2024-01-09 12:23:37 -08:00
Alex Boten 6312e62ea4
add benchmark test for multi batch processing (#7717)
* add benchmark test for multi batch processing

This refactors the batch processor tests to make testing multiple configuration
scenarios easier. It adds a testcase for a batch processor w/ metadata keys.

Signed-off-by: Alex Boten <aboten@lightstep.com>

* use RunParallel

Signed-off-by: Alex Boten <aboten@lightstep.com>

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
2023-05-23 15:12:47 -07:00
Bogdan Drutu bf6ca2bc95
Fix start/stop logic for batch processor (#7708)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2023-05-22 13:39:04 -07:00
Alex Boten 80d704deb4
[chore] use license shortform (#7694)
* [chore] use license shortform

To remain consistent w/ contrib repo, see https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/22052

Signed-off-by: Alex Boten <aboten@lightstep.com>

* make goporto

Signed-off-by: Alex Boten <aboten@lightstep.com>

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
2023-05-18 13:11:17 -07:00
Joshua MacDonald aa206e399c
Add batchprocessor support for client metadata (#7578) 2023-05-16 11:41:33 -07:00
Joshua MacDonald 27d3efb1e0
Batch processor support for split-only configuration (#7509)
Implement the fixes proposed in #7508. Otherwise, using a batchprocessor with Config{} passes validation but acts badly at runtime there is both a zero-duration timer and the call to sendItems never returns, constantly sending empty batches.
2023-04-07 15:35:55 -07:00
Bogdan Drutu 430fb80141
[chore] limit usage of the use otel feature gate, pass the bool directly to simplify usage (#6985)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2023-01-19 18:29:21 -08:00
Bogdan Drutu 1699701fd6
Deprecate featuregate.GetRegistry in favor of GlobalRegistry (#6979)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2023-01-19 15:08:13 -08:00
Bogdan Drutu 7cb2d7622d
Remove deprecated comonent.Config.[ID|SetIDName]; Deprecate config.*Settings (#6718)
* Remove deprecated comonent.Config.[ID|SetIDName]; Deprecate config.*Settings

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Update .chloggen/rmcfgid-1.yaml

Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
2022-12-12 14:35:45 -08:00
Daniel Jaglowski fdef8b181a
Deprecate `Processor` related structs and functions in favor of `processor` package (#6709) 2022-12-09 08:09:27 -08:00
Bogdan Drutu d0fe772781
Deprecate component.Config.ID(), add helper for obsreporttest (#5870)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-11-29 14:35:49 -08:00
Gustavo Paiva 2da68656b8
Instrument `batch` processor with Otel Go (#6423)
- Instrument batch processor with OpenTelemetry Go.
- Also fixed a small typo on the bucket definition of the batch_send_size_bytes view of OpenCensus.
2022-11-16 15:08:28 -08:00
Bogdan fbf1e2a09c Revert changes to config.[Receiver|Processor|Exporter|Extension]Settings
Signed-off-by: Bogdan <bogdandrutu@gmail.com>
2022-11-05 10:04:50 -07:00
Bogdan d6ed8246b6 Deprecate all types and funcs in config package
The main reason is to remove the circular dependency between the config (including sub-packages) and component. Here is the current state:
* component depends on config
* config/sub-package[grpc, http, etc.] depends on config & component

Because of this "circular" dependency, we cannot split for example "config" into its own module, only if all the other config sub-packages are also split.

Signed-off-by: Bogdan <bogdandrutu@gmail.com>
2022-11-05 10:04:49 -07:00
Bogdan Drutu bb193a24d0
Deprecate New[JSON|Proto][Marshaler|Unmarshale], expose the structs (#6340)
The main motivation is because we want to be able to extend these Marshaler/Unmarshaler implementation with possible options.

Because of that we have 2 options: 1. add Option to each New func, OR 2. expose the structs so that later users can configure different options inside these structs, similar with `jsonpb.Marshaler`.

I implemented the version 2 since it is simpler, and less code, and also common in the industry.

Signed-off-by: Bogdan <bogdandrutu@gmail.com>

Signed-off-by: Bogdan <bogdandrutu@gmail.com>
2022-10-18 15:29:37 -07:00
Dmitrii Anoshin 7740c7b387
Remove usages of deprecated pdata Clone methods (#6170) 2022-09-28 18:25:22 -07:00
Corbin Phelps f0d69d6822
[processor/batch] Removed casts to Sizer interface in batch processor (#5937)
* Removed casts to Sizer interface in batch processor

Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>

* Added changelog entry

Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>

* removed changelog

Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>

Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
2022-08-19 09:31:09 -07:00
Bogdan Drutu 1a4361c49a
Remove unnecessary and unused testdata (#5599)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-06-27 09:43:33 -07:00
Nathan Vērzemnieks 65b7b1be5d
Send correct batch stats when SendBatchMaxSize is set (#5385)
The stat was getting sent before the max batch size was
taken into account.
2022-06-02 14:18:07 -07:00
Dmitrii Anoshin 734e25e8de
Split `model` by signal type and move it to the new `pdata` module (#5168)
Split all `pdata` related code by type and move it from `model` to the new module `pdata`.

- `model/pdata` and `model/otlp` are moved to `pdata/plog`, `pdata/pmetric` and `pdata/ptrace`.
- `model/otlpgrpc` is moved to `pdata/plogotlp`, `pdata/pmetricotlp` and `pdata/ptraceotlp`.

Now all the API in `model` except for `model/semconv` is deprecated.
2022-04-11 16:00:26 -07:00
Alex Boten 1d5fdd1c1f
Deprecation of pdata methods following OTLP v0.15.0 (#5076)
* Deprecation of pdata methods following OTLP v0.15.0

Adding deprecation methods for the following pdata methods:
  - InstrumentationLibrary is now Scope
  - InstrumentationLibrarySpans is now ScopeSpans
  - InstrumentationLibraryLogs is now ScopeLogs
  - InstrumentationLibraryMetrics is now ScopeMetrics

* update changelog

* add deprecated method on resource spans/metrics/logs

* add InstrumentationLibrary deprecation method
2022-03-28 00:32:48 -07:00
Tigran Najaryan 18fb01178b
Remove usage of LogRecord.Name field (#4804)
The LogRecord Name field [is removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2271) from the specification and is [going to be removed](https://github.com/open-telemetry/opentelemetry-proto/pull/357) from the OTLP.
2022-02-08 08:56:16 -08:00
Tigran Najaryan 5ee1fec9fe
Update to OTLP proto 0.12.0 (#4724)
- Removed all deprecated metric messages and corresponding conversion code and tests.
- Removed deprecated_code from span status and corresponding conversions and tests.
- Renamed logs field to log_records in InstrumentationLibraryLogs message.
2022-01-26 10:35:15 -08:00