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

fix(collector): keep EOL events open instead of recreating them #771

Merged
merged 1 commit into from
May 5, 2023

Conversation

basti1302
Copy link
Contributor

Issue events that are sent to the Instana agent (and thereby indirectly to the Instana backend), are discarded when they expire according to their "duration" property. To keep them open for the entire lifetime of the entity (which makes sense for the EOL events we are dealing with here), we are ought to resend them before they expire in a heartbeat- like fashion. The backend requires a unique "path" attributes on these events to be able to group them together and to know that it is supposed to keep the already created issue open instead of opening a new issue. This commit adds that "path" attribute.

Also:

  • change the duration of the event from 10 minutes to 6 hours
  • rename the misnamed AgentConnectionEvent type to just Event

@basti1302 basti1302 requested a review from a team April 27, 2023 12:05
@@ -211,13 +214,13 @@ function sendEOLEvent() {
/**
* Sends an issue event to the agent when the Node.js version has reached end of life.
* It will work for non serverless environments where an agent is present.
* Also, currently the serverless-acceptor does not have support for events.
* (At the time of writing, serverless-acceptor does not have support for events.)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: This sounds a bit like the support for serverless environments would be added here.
How about?

"At the time of writing, serverless-acceptor does not have support for events. See packages/serverless/src/backend_connector.js"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure I follow. This is talking about the Instana backend service serverless-acceptor. Support for ingesting events would need to be added there before we can add it in any of our modules. I'll try to make that more clear.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes.
packages/serverless/src/backend_connector.js === backend service serverless-acceptor

Copy link
Contributor Author

@basti1302 basti1302 Apr 27, 2023

Choose a reason for hiding this comment

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

No.

https://github.ibm.com/instana/backend/blob/develop/serverless-acceptor/src/main/java/com/instana/serverless/ServerlessAcceptorApp.java === backend service serverless-acceptor

Anyway, I've changed the comment, so this should hopefully be a bit more clear now.

@kirrg001
Copy link
Contributor

fix(eol): keep EOL events open instead of recreating them

Suggestion:

"fix(collector): keep EOL events open instead of recreating them"

@basti1302 basti1302 enabled auto-merge (rebase) April 27, 2023 13:33
@basti1302 basti1302 changed the title fix(eol): keep EOL events open instead of recreating them fix(collector): keep EOL events open instead of recreating them Apr 27, 2023
@basti1302 basti1302 disabled auto-merge April 27, 2023 13:35
@basti1302
Copy link
Contributor Author

For the record, I need to keep this open for a while to make some corresponding changes in the backend as well. I want to make the backend changes before merging this.

Issue events that are sent to the Instana agent (and thereby indirectly
to the Instana backend), are discarded when they expire according to
their "duration" property. To keep them open for the entire lifetime of
the entity (which makes sense for the EOL events we are dealing with
here), we are ought to resend them before they expire in a heartbeat-
like fashion. The backend requires a unique "path" attributes on these
events to be able to group them together and to know that it is supposed
to keep the already created issue open instead of opening a new
issue. This commit adds that "path" attribute.

Also:
- change the duration of the event from 10 minutes to 6 hours
- rename the misnamed AgentConnectionEvent type to just Event
@basti1302 basti1302 enabled auto-merge (rebase) May 5, 2023 08:13
@basti1302 basti1302 merged commit 6de9965 into main May 5, 2023
@basti1302 basti1302 deleted the fix/add-path-to-eol-event branch May 5, 2023 08:24
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.

2 participants