Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[next] merge changes from main #4471

Merged
merged 77 commits into from
Feb 12, 2024

Conversation

pichlermarc
Copy link
Member

@pichlermarc pichlermarc commented Feb 9, 2024

Updates next with the latest changes from main.
All changes here are pre-reviewed already.

See #4308

dyladan and others added 30 commits November 20, 2023 10:33
… listener

Fixes a memory leak where unhandled response bodies pile up in node 20
…lemetry#4315)

* feat: add script to update changelogs on releases

* fix: address comments

* Apply suggestions from code review

Co-authored-by: Trent Mick <trentm@gmail.com>

* fix: apply suggestions from code review

* fix: use packageJson.version instead of version

---------

Co-authored-by: Trent Mick <trentm@gmail.com>
fix(instrumentation-http): resume responses when there is no response…
…open-telemetry#4289)

* feat(sdk-logs): add droppedAttributesCount field to ReadableLogRecord

* chore: check droppedAttributesCount value in test case

* feat(otlp-transformer): make toLogRecord() use ReadableLogRecord.droppedAttributesCount

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
…ry#4345)

* fix: allow passing in TimeInput for LogRecord

* chore: update changelog
open-telemetry#4334)

* fix: programmatic url and headers take precedence in metric exporters (open-telemetry#2370)

* chore: adjust grpc exporter metrics test

* chore(changelog): update changelog
pichlermarc and others added 22 commits January 24, 2024 14:30
… of 'readers' constructor option (open-telemetry#4427)

* feat(sdk-metrics): add 'readers' constructor option, deprecate MeterProvider.addMetricReader()

* fix(changelog): update changelog entry, fix format
…en-telemetry#4287)

* fix(sdk-trace-base): Export processed spans while exporter failed

While the exporter deals with a batch of spans, new spans may come in and wait
to be exported. As previously implemented, a successful export would notice
these waiting spans, triggering a renewed timer check, but not so for an
unsuccessful export.

The result was that, prior to this commit, a failing export may end up in a
situation where no further spans will be exported. This is due to the behaviour
of `_addToBuffer` when the queue is full: Imagine an export which fails after a
long timeout (because of, for instance, network troubles). While the connection
waits to be timed out, the span queue fills up. Once completely full, no new
calls to recheck the timer will be done. On its own, this behaviour is
fine. When combined with the patched bug, this leads to a rather confusing case
where the exporter never tries exporting.

* fix(changelog): add entry

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
…#4441)

* fix(instrumentation): pin import-in-the-middle@1.7.1

* fix(changelog): add changlog entry

* Update experimental/CHANGELOG.md

Co-authored-by: Trent Mick <trentm@gmail.com>

* fix(changelog): additional details

* fix(changelog): formatting

* fix(changelog): lint

---------

Co-authored-by: Trent Mick <trentm@gmail.com>
* fix(exporter-logs-otlp-grpc): set User-Agent header

* fix(exporter-logs-otlp-http): set User-Agent header

* fix(exporter-logs-otlp-proto): set User-Agent header

* chore(changelog): update changelog

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
…etry#4431)

* refactor(exporter-prometheus): promisify prometheus tests

* fix: lint

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
…n-telemetry#4267)

* docs: add observableGauge to the prometheus experimental example

Signed-off-by: Francois LP <francois.le.pape@gmail.com>

* docs: add gauge image to README

Signed-off-by: Francois LP <francois.le.pape@gmail.com>

* refactor: change comment wording

from @pichlermarc

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

---------

Signed-off-by: Francois LP <francois.le.pape@gmail.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
… headers with fetch (open-telemetry#4348)

* fix(@opentelemetry-instrumentation-fetch): compatibility with Map inputs for request headers with fetch

* Update experimental/CHANGELOG.md

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* adding description for ts-ignore

* fix(changlog): move entry to unreleased

* fix: add lint ignore

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
* chore: prepare release 1.21.0/0.48.0

* chore: sync package-lock.json
…metry#4394)

* fix(sdk-node): Allow tracerProvider to be created when exporter is defined in the env.

* fix(node-sdk): Update to not accept when exporter is set to none.

* fix(sdk-node): Update Changelog.

* fix(sdk-node): Fix Changelog.

* fix(sdk-node): cleanup changelog.

* fix(sdk-node): lint fix

* fix(sdk-node): Fix logic for creating tracerProviders.

* Fix lint.

* Update experimental/CHANGELOG.md

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* Fix manual sampler and environment exporter case.

* Update logic to check for a defined traceExporter on the config before using the NodeTracerProvider.

* Fix equality check.

* Update env exporter configuration logic and add tests.

* Update experimental/CHANGELOG.md

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* Fix changelog issues.

* Clean up tracerProvider logic.

* Update sdk.ts

* Update sdk.ts

* Update experimental/packages/opentelemetry-sdk-node/test/sdk.test.ts

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* Update experimental/packages/opentelemetry-sdk-node/test/sdk.test.ts

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* Update experimental/packages/opentelemetry-sdk-node/test/sdk.test.ts

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
…nstrumentation (open-telemetry#4420)

* refactor(instrumentation-grpc): clean up remnants of 'grpc' package instrumentation

* fix(changelog): add changelog entry
…-telemetry#4418)

* Make InstrumentationAbstract.init public

* Update changelog

* Update JSDoc

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
…try#4314)

* Allow LoggerProvider to be specified in Instrumentations

* Update

* Lint

* Add test

* npm i

* Update changelog

* npm i

* marking setLoggerProvider as optional

* Add check for possible undefined method

* npm i
…elemetry#4459)

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
…lemetry#4455)

* fix(sdk-metrics): ignore NaN value recordings

* fix(changelog): add changelog entry

* test(exporter-prometheus): adapt tests

* fix(sdk-metrics): ignore in accumulation instead

* fix(changelog): update changelog
* fix(sdk-metrics): allow single bucket histograms

* test(sdk-metrics): undefined and null inputs for bucket boundaries

* fixup! test(sdk-metrics): undefined and null inputs for bucket boundaries
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
Copy link

codecov bot commented Feb 9, 2024

Codecov Report

Merging #4471 (19b433e) into next (543f0b4) will increase coverage by 0.23%.
Report is 9 commits behind head on next.
The diff coverage is 93.48%.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #4471      +/-   ##
==========================================
+ Coverage   92.24%   92.47%   +0.23%     
==========================================
  Files         332      330       -2     
  Lines        9437     9505      +68     
  Branches     1999     2023      +24     
==========================================
+ Hits         8705     8790      +85     
+ Misses        732      715      -17     
Files Coverage Δ
api/src/experimental/index.ts 100.00% <100.00%> (ø)
...erimental/packages/api-logs/src/types/LogRecord.ts 100.00% <ø> (ø)
...ges/exporter-logs-otlp-grpc/src/OTLPLogExporter.ts 92.85% <100.00%> (+0.54%) ⬆️
...ogs-otlp-http/src/platform/node/OTLPLogExporter.ts 100.00% <100.00%> (ø)
...gs-otlp-proto/src/platform/node/OTLPLogExporter.ts 100.00% <100.00%> (ø)
...e-otlp-http/src/platform/node/OTLPTraceExporter.ts 100.00% <ø> (ø)
...-otlp-proto/src/platform/node/OTLPTraceExporter.ts 100.00% <ø> (ø)
...porter-metrics-otlp-grpc/src/OTLPMetricExporter.ts 93.75% <100.00%> (+0.20%) ⬆️
...er-metrics-otlp-http/src/OTLPMetricExporterBase.ts 94.11% <100.00%> (+0.78%) ⬆️
...metrics-otlp-http/src/OTLPMetricExporterOptions.ts 100.00% <ø> (ø)
... and 40 more

... and 2 files with indirect coverage changes

@dyladan
Copy link
Member

dyladan commented Feb 9, 2024

There is just no possible way to review these merges back into next. I'm not sure what to do. Should we rubber-stamp because all the code has already been reviewed once already? The biggest risk is that maybe one of the merge conflicts would be incorrectly resolved. I think it's ok though. If the tests pass I have reasonably high confidence that at least nothing huge is broken.

Copy link
Member

@dyladan dyladan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at all .ts files (skipping tests) at least. I don't see any glaring issues

link for those that want to do the same: https://github.com/open-telemetry/opentelemetry-js/pull/4471/files?file-filters%5B%5D=.ts&show-deleted-files=false&show-viewed-files=false

@dyladan
Copy link
Member

dyladan commented Feb 9, 2024

IMPORTANT: do not "squash and merge" you must create a merge commit or the next merge will be even more difficult

@pichlermarc pichlermarc marked this pull request as ready for review February 12, 2024 10:57
@pichlermarc pichlermarc requested a review from a team February 12, 2024 10:57
@pichlermarc pichlermarc merged commit 83becc7 into open-telemetry:next Feb 12, 2024
19 checks passed
@pichlermarc pichlermarc deleted the next-main-02-09 branch February 12, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.