-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
@@ -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" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
toJDK_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
andCONFIG_FORCE_*
which I find a bit hacky.
None of this is critical. But in my opinion it makes things a bit neater.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -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) \ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
No description provided.