Skip to content

Adding upload statistics and alerts for both app binary uploads towards the CF API and OS uploads - #1885

Open
karrgov wants to merge 4 commits into
masterfrom
dynatrace_monitoring
Open

Adding upload statistics and alerts for both app binary uploads towards the CF API and OS uploads#1885
karrgov wants to merge 4 commits into
masterfrom
dynatrace_monitoring

Conversation

@karrgov

@karrgov karrgov commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Adding upload statistics and alerts for both app binary uploads towards the CF API and OS uploads

LMCROSSITXSADEPLOY-3054

@karrgov
karrgov force-pushed the dynatrace_monitoring branch from 6b53ead to 20645c9 Compare July 31, 2026 09:24
requires software.amazon.awssdk.retries.api;
requires static java.compiler;
requires static org.immutables.value;
requires io.netty.handler;

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.

If this is needed, sort it alphabetically

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.

discussed :D

}

public long maxDurationMs() {
return maxDuration.getAndSet(0);

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.

why is this set to 0 after the value is read?

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.

This is on purpose as well, since Dynatrave is configured to poll each one minute which means that the poll happens at a random moment during these 60 seconds, which I would say that it is not fully correct, since a better way would be the way I have done it now - I am saving the maximum value per every 60 second poll and that is the value that dynatrace then displays on the charts. The idea is that in this one minute there might be a problematic deployment with lets say an abnormally high upload time and then after a couple of seconds there might be another totally normal one and the value would be overwritten and then if the Dynatrace poll is right after that - the chart would show that everything is totally alright.

}

public long timeoutsInWindow() {
return timeoutsInWindow.getAndSet(0);

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.

same?

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.

same as the one above :D

import java.util.concurrent.atomic.LongAdder;

@Named
public class UploadDurationTracker {

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.

This class which dynatrace uses for monitoring is only in memory - per instance and the values will be zero after restart of instance of DS, LSS. This is expected right?

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.

Yes, I made it like that on purpose so we are better able to see when and if an instance has any problems and also we do not have to think and be responsible about the persistence part of the whole thing, since Dynatrace automatically saves the information on the charts, even after if lets say there have been lots of restarts. We would only have to change the timeframe and we will be able to see if and which metric exactly has abnormal values.

LMCROSSITXSADEPLOY-3054
@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
37.9% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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