Skip to content

Conversation

@ishleenk17
Copy link
Member

@ishleenk17 ishleenk17 commented Oct 14, 2025

This is a draft version of NGINX OpenTelemetry Input Package.
Since this is the very first OTEL Input package, this PR is being used to figure out the structure, template, what works what doesn't while creating packages.

FYI, using HTTPChecker example as reference

Relates: https://github.com/elastic/obs-integration-team/issues/622

@andrewkroh andrewkroh added New Integration Issue or pull request for creating a new integration package. documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. labels Oct 14, 2025
@ishleenk17 ishleenk17 self-assigned this Oct 27, 2025
@ishleenk17
Copy link
Member Author

ishleenk17 commented Oct 27, 2025

@jsoriano @cmacknz : Could you please review this first OTEL input package

Point to discuss:

  1. We need to have a check in data_stream.dataset. It should always be same as the receiver name (for metrics) for the content package to autoinstall. For logs we need to see how will we ensure about the datastream field.
  2. Under compatibility section of documentation, what all should we mention or shall we just point to the upstream receiver ? I think pointing to upstream receiver might not be right as our EDOT collector might not be at that the upstream collector label ?
  3. Ideally we don't need base-fileds.yml. But elastic package doesn't allow to build the package without that. We should remove this check for these fields in OTEL Input package.
  4. If we are updating this, we should also update the corresponding content package documentation. We need to discuss how. Currently it contains how a collecotr config looks like. But since now that info is there in the input package. Should we have that in content package ? We might need it if someone tries to install that content package via upstream collector and not EDOT. Thoughts ?

cc: @tommyers-elastic

@ishleenk17 ishleenk17 marked this pull request as ready for review October 27, 2025 10:51
@ishleenk17 ishleenk17 requested a review from a team as a code owner October 27, 2025 10:51
@ishleenk17 ishleenk17 changed the title [Draft] NGINX OpenTelemetry Input Package NGINX OpenTelemetry Input Package Oct 27, 2025
@@ -0,0 +1,63 @@
# NGINX OpenTelemetry Input Package
Copy link
Contributor

Choose a reason for hiding this comment

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

i wonder how much of this we should just delegate to the upstream receiver. i.e. i could see an argument for literally just something like

An Elastic Agent wrapper around the nginxreceiver. Compatible with the Nginx Content Pack.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am open to discussions on this one.

Copy link
Member Author

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

I like that, if we could delegate to the upstream receiver this means less work on our side. Do you foresee any cons to delegating to the upstream receiver? Wouldn't want to go into one way doors.

Copy link
Member Author

Choose a reason for hiding this comment

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

@tommyers-elastic : Maybe we can write this in the Metric reference section. Other parts of the documentation should be there IMO. WDYT ?

nginx:
endpoint: {{nginx_endpoint}}
collection_interval: {{period}}
processors:
Copy link
Contributor

Choose a reason for hiding this comment

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

it would be great if agent could provide more flexibility for resource detection processing. i.e it could be a setting at the agent policy level. system seems a sensible default, but ec2 looks out of place to me here.

Copy link
Contributor

@tommyers-elastic tommyers-elastic Oct 27, 2025

Choose a reason for hiding this comment

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

additionally, do you know if agent injects any batching or memory limiter processor configs?

Copy link
Member Author

@ishleenk17 ishleenk17 Oct 27, 2025

Choose a reason for hiding this comment

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

Yes, I would expect the RDP processor to be a default one by Fleet at policy level.

additionally, do you know if agent injects any batching or memory limiter processor configs?

Nothing that I see in the agent policy that is created. @jsoriano is there any ?

Copy link
Member

Choose a reason for hiding this comment

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

it would be great if agent could provide more flexibility for resource detection processing. i.e it could be a setting at the agent policy level. system seems a sensible default, but ec2 looks out of place to me here.

Do you think most packages are going to have this resourcedetection processor? If that's the case this should be probably managed by Fleet, and not included in all packages.

additionally, do you know if agent injects any batching or memory limiter processor configs?

Nothing that I see in the agent policy that is created. @jsoriano is there any ?

Not that I know.

Copy link
Member

Choose a reason for hiding this comment

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

resourcedetection should be a default global processor, and the list of global processors needs to be editable (unlike the hard coded list in agent today). I always envisioned that global processors would be associated with exporters.

Copy link
Member

Choose a reason for hiding this comment

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

resourcedetection should be a default global processor, and the list of global processors needs to be editable (unlike the hard coded list in agent today).

So in the case of Fleet-managed integrations they should be handled by Fleet, right?
Do they need to be included in packages then as is being done here? We risk having duplicates if this starts being managed by Fleet.

I always envisioned that global processors would be associated with exporters.

There probably needs to be both, processors associated to exporters and to policies.

Copy link
Member Author

Choose a reason for hiding this comment

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

For now are we going to go ahead with processor as part of the agent config ?
@jsoriano @cmacknz

Copy link
Member

Choose a reason for hiding this comment

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

So in the case of Fleet-managed integrations they should be handled by Fleet, right?

Yes, the default processors would have to be defined in Fleet which we don't do yet and has some problems e.g. needing a Kibana release to change the config. Creating an output package type was one idea for how to solve this.

Per policy global processors would also make sense but this could just be syntactic sugar that inserts them into each exporter pipeline.

For now are we going to go ahead with processor as part of the agent config ?

Yes there is no other way for us to do this right now. I think you would want the detectors or even the whole processor configuration to be configurable though.

Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't ths be the nginx logo?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was thinking about generating NGINX+OTEL logo. The way we have been doing for content packs.
WDYT ?

nginx:
endpoint: {{nginx_endpoint}}
collection_interval: {{period}}
processors:
Copy link
Member

Choose a reason for hiding this comment

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

it would be great if agent could provide more flexibility for resource detection processing. i.e it could be a setting at the agent policy level. system seems a sensible default, but ec2 looks out of place to me here.

Do you think most packages are going to have this resourcedetection processor? If that's the case this should be probably managed by Fleet, and not included in all packages.

additionally, do you know if agent injects any batching or memory limiter processor configs?

Nothing that I see in the agent policy that is created. @jsoriano is there any ?

Not that I know.

Copy link
Member

@jsoriano jsoriano Oct 27, 2025

Choose a reason for hiding this comment

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

This file can be removed. OTel input packages rely on pre-built component templates.

If this is the only fields file, build will fail, till we release elastic/package-spec#994 (probably this week).

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this is mostly going to be the only file under fields. I don't expect any mappings to go in here.
Do we actually expect predefined mappings for OTEL Input packages.
Or we can rely on the otel template and the dynamic mappings ?

Copy link
Member

Choose a reason for hiding this comment

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

Do we actually expect predefined mappings for OTEL Input packages.
Or we can rely on the otel template and the dynamic mappings ?

We can rely on the pre-installed template and the dynamic mappings it includes.

We still have the option of defining fields if needed in some case, but defining fields will be completely optional for OTel input packages. It will be actually expected for OTel input packages to don't contain any field definition.

ishleenk17 and others added 2 commits October 28, 2025 00:51
@elasticmachine
Copy link

💚 Build Succeeded

History

cc @ishleenk17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. New Integration Issue or pull request for creating a new integration package.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants