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

add telemetry to hocon file #2

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

istreeter
Copy link
Contributor

No description provided.

@istreeter istreeter requested a review from jbeemster July 1, 2023 11:38
@istreeter istreeter mentioned this pull request Jul 10, 2023
@@ -50,7 +50,7 @@ variable "tags" {

variable "java_opts" {
description = "Custom JAVA Options"
default = "-Dorg.slf4j.simpleLogger.defaultLogLevel=info -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=75"
default = "-XX:InitialRAMPercentage=75 -XX:MaxRAMPercentage=75"
Copy link

@colmsnowplow colmsnowplow Jul 10, 2023

Choose a reason for hiding this comment

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

If I'm understanding you, this should be the default java opts for all (java runtime) app modules?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. These memory settings are more appropriate for how we run a single app per vm. And the log level setting is already the slf4j default, so need to add it here again explicitly.

Copy link
Contributor Author

@istreeter istreeter Jul 11, 2023

Choose a reason for hiding this comment

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

In my opinion, some of the other changes I made here should also be how we do things in all other terraform modules:

  • Change JAVA_OPTS to JDK_JAVA_OPTIONS, which is the more standard env var and is compatible with our distroless images.
  • Template instanceId into the hocon file using an environment variable. So that all configuration comes from the same place.
  • Stop using -Dconfig.override_with_env_vars=true and CONFIG_FORCE_* which I find a bit hacky.

None of this is critical. But in my opinion it makes things a bit neater.

Copy link

@colmsnowplow colmsnowplow left a comment

Choose a reason for hiding this comment

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

LGTM!

@colmsnowplow colmsnowplow merged commit 937bb6d into release/0.1.0 Jul 11, 2023
1 check passed
@@ -24,8 +24,8 @@ sudo docker run \
--env AZURE_TENANT_ID=${tenant_id} \
--env AZURE_CLIENT_ID=${client_id} \
--env AZURE_CLIENT_SECRET=${client_secret} \
--env 'JAVA_OPTS=-Dconfig.override_with_env_vars=true ${java_opts}' \
--env "CONFIG_FORCE_telemetry_instanceId=$(get_instance_id)" \
--env INSTANCE_ID=$(get_instance_id) \
Copy link
Member

Choose a reason for hiding this comment

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

Can we please validate that this does indeed work? I tried this way initially and the reason I went for the force option is that it wasn't correctly seeding into the config or the tracking that was coming out.

Copy link

@colmsnowplow colmsnowplow Jul 17, 2023

Choose a reason for hiding this comment

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

I think I was too hasty merging, apologies I misunderstood where we were up to with this and was too eager to press forward.

Bear with me though I encountered and solved a possibly related issue in another PR. Let me test what you describe here and circle back

@istreeter istreeter deleted the 0.1.0-amendment-telemetry branch July 17, 2023 21: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.

3 participants