Skip to content

[Serverless] Enable OTLP endpoint in extension.#15321

Merged
purple4reina merged 29 commits into
mainfrom
rey.abolofia/serverless-otlp
Feb 14, 2023
Merged

[Serverless] Enable OTLP endpoint in extension.#15321
purple4reina merged 29 commits into
mainfrom
rey.abolofia/serverless-otlp

Conversation

@purple4reina

Copy link
Copy Markdown
Contributor

What does this PR do?

This adds support for enabling the OTLP endpoint when using the aws lambda extension. The configuration for turning this feature on is the same as it is for the regular agent.

Motivation

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

Reviewer's Checklist

  • If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
  • A release note has been added or the changelog/no-changelog label has been applied.
  • Changed code has automated tests for its functionality.
  • Adequate QA/testing plan information is provided if the qa/skip-qa label is not applied.
  • At least one team/.. label has been applied, indicating the team(s) that should QA this change.
  • If applicable, docs team has been notified or an issue has been opened on the documentation repo.
  • If applicable, the need-change/operator and need-change/helm labels have been applied.
  • If applicable, the k8s/<min-version> label, indicating the lowest Kubernetes version compatible with this feature.
  • If applicable, the config template has been updated.

Comment thread pkg/otlp/collector.go Outdated
DisableGracefulShutdown: true,
ConfigProvider: configProvider,
LoggingOptions: options,
SkipSettingGRPCLogger: true,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

See comment on commit 3f4a78e for more details on this change.

@gbbr gbbr Jan 31, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add the text from the description of the commit you've linked above as an inline comment. Alternatively, a link to the commit message itself will also do.

If any issue exists upstream about this problem (?) of locking it would be nice to link to that too. If not, does it make sense to open one?

Comment thread cmd/serverless/main.go Outdated
// Concurrently start heavyweight features
var wg sync.WaitGroup
wg.Add(3)
wg.Add(4)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would recommend pairing a wg.Add(1) directly above every go func call to pair it with it's wg.Done() counterpart to avoid any counting mistakes later on.

Comment thread pkg/otlp/collector.go Outdated
DisableGracefulShutdown: true,
ConfigProvider: configProvider,
LoggingOptions: options,
SkipSettingGRPCLogger: true,

@gbbr gbbr Jan 31, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add the text from the description of the commit you've linked above as an inline comment. Alternatively, a link to the commit message itself will also do.

If any issue exists upstream about this problem (?) of locking it would be nice to link to that too. If not, does it make sense to open one?

Comment thread pkg/serverless/otlp/otlp.go
Comment thread pkg/serverless/otlp/otlp.go Outdated
Comment thread pkg/serverless/otlp/otlp.go
@purple4reina
purple4reina force-pushed the rey.abolofia/serverless-otlp branch 3 times, most recently from 411874a to 27bb5f8 Compare February 7, 2023 22:03
@purple4reina
purple4reina requested a review from a team as a code owner February 9, 2023 19:49

@rtrieu rtrieu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor feedback, otherwise looks good.

Comment thread releasenotes/notes/serverless-enable-otlp-endpoint-6134c9fc34254599.yaml Outdated
@purple4reina
purple4reina requested review from gbbr and mx-psi February 9, 2023 21:54
@purple4reina
purple4reina force-pushed the rey.abolofia/serverless-otlp branch 3 times, most recently from 3268de4 to aef8ffd Compare February 10, 2023 18:39
@purple4reina
purple4reina requested a review from rtrieu February 10, 2023 18:58
@purple4reina
purple4reina force-pushed the rey.abolofia/serverless-otlp branch from 6cb726a to 7d46d12 Compare February 10, 2023 19:17
@purple4reina

Copy link
Copy Markdown
Contributor Author

FYI. Related PR to build serverless extensions with the otlp build tag: DataDog/datadog-lambda-extension#114

@purple4reina
purple4reina force-pushed the rey.abolofia/serverless-otlp branch from 7d46d12 to dbe51b3 Compare February 10, 2023 19:50

@rtrieu rtrieu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@gbbr gbbr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM as far as pkg/otlp goes.

Comment thread pkg/serverless/otlp/otlp.go Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think this warrants its own package. It's a very small one-off thing used exclusively in one place. Furthermore, it creates clashing with another existing package (in name). However, I don't feel strongly about this and will leave it completely up to you to decide what to do here.

@mx-psi mx-psi added the team/opentelemetry OpenTelemetry team label Feb 13, 2023

@mx-psi mx-psi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, added team/opentelemetry since we should also test our pipeline during QA to avoid regressions

@purple4reina
purple4reina force-pushed the rey.abolofia/serverless-otlp branch from cbccb06 to 7cc4077 Compare February 13, 2023 23:08

@Kaderinho Kaderinho left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM for the config

@purple4reina
purple4reina merged commit b3a2798 into main Feb 14, 2023
@purple4reina
purple4reina deleted the rey.abolofia/serverless-otlp branch February 14, 2023 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team/opentelemetry OpenTelemetry team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants