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

Delay app id retrieval for Linux consumption plan and increment version #1730

Merged
merged 4 commits into from
Jun 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# CHANGELOG

# Version 3.1.1
* Fix 2.x interop of timestamps [#1726](https://github.com/microsoft/ApplicationInsights-Java/pull/1726).
* Add metric filtering to telemetry processor [#1728](https://github.com/microsoft/ApplicationInsights-Java/pull/1728).
* Add log processor to telemetry processor [#1713](https://github.com/microsoft/ApplicationInsights-Java/pull/1713).
* Fix app id retrieval 404 for Linux Consumption Plan [#1730](https://github.com/microsoft/ApplicationInsights-Java/pull/1730).

# Version 3.1.1-BETA.4
* Reduce agent jar file size back to normal [#1716](https://github.com/microsoft/ApplicationInsights-Java/pull/1716).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,12 @@ public void beforeByteBuddyAgent(Config config) {
public void afterByteBuddyAgent(Config config) {
// only safe now to resolve app id because SSL initialization
// triggers loading of java.util.logging (starting with Java 8u231)
// and JBoss/Wildfly need to install their own JUL manager before JUL is initialized
AppIdSupplier.registerAndStartAppIdRetrieval();
// and JBoss/Wildfly need to install their own JUL manager before JUL is initialized.
// Delay registering and starting AppId retrieval to later when the connection string becomes available
// for Linux Consumption Plan.
if (!"java".equals(System.getenv("FUNCTIONS_WORKER_RUNTIME"))) {
AppIdSupplier.registerAndStartAppIdRetrieval();
}
}

private static void start(Instrumentation instrumentation) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ private static void setValue(String value) {
// TODO handle APPLICATIONINSIGHTS_SAMPLING_PERCENTAGE
DelegatingSampler.getInstance().setAlwaysOnDelegate();
logger.info("Set connection string {} lazily for the Azure Function Consumption Plan.", value);

// register and start app id retrieval after the connection string becomes available.
AppIdSupplier.registerAndStartAppIdRetrieval();
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Project properties
version=3.1.1-BETA.5
version=3.1.1
group=com.microsoft.azure