Title: Service shutdown when instrumenting with javaagent · Issue #255 · hypertrace/javaagent · GitHub
Open Graph Title: Service shutdown when instrumenting with javaagent · Issue #255 · hypertrace/javaagent
X Title: Service shutdown when instrumenting with javaagent · Issue #255 · hypertrace/javaagent
Description: Tried instrumenting one of the hypertrace java service (https://github.com/hypertrace/hypertrace-service/tree/main/hypertrace-data-config-service) with java agent. The service was deployed in k8s cluster locally using helm. Dockerfile us...
Open Graph Description: Tried instrumenting one of the hypertrace java service (https://github.com/hypertrace/hypertrace-service/tree/main/hypertrace-data-config-service) with java agent. The service was deployed in k8s c...
X Description: Tried instrumenting one of the hypertrace java service (https://github.com/hypertrace/hypertrace-service/tree/main/hypertrace-data-config-service) with java agent. The service was deployed in k8s c...
Opengraph URL: https://github.com/hypertrace/javaagent/issues/255
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Service shutdown when instrumenting with javaagent ","articleBody":"Tried instrumenting one of the hypertrace java service (https://github.com/hypertrace/hypertrace-service/tree/main/hypertrace-data-config-service) with java agent.\r\nThe service was deployed in k8s cluster locally using helm. \r\n\r\nDockerfile used for building the image (locally built the service image to embed agent):\r\n```\r\nFROM hypertrace/javaagent:latest\r\nARG COMMIT_SHA=unknown\r\nLABEL commit_sha=${COMMIT_SHA}\r\nENV COMMIT_SHA=${COMMIT_SHA}\r\nLABEL maintainer=\"Hypertrace 'https://www.hypertrace.org/'\"\r\n#RUN wget https://github.com/hypertrace/javaagent/releases/latest/download/hypertrace-agent-all.jar -O /javaagent.jar ;\r\nWORKDIR /app\r\n\r\nCOPY scripts/hypertrace-data-config-service run\r\nCOPY libs libs\r\nCOPY resources resources\r\nCOPY classes classes\r\nENV SERVICE_NAME=hypertrace-data-config-service CLUSTER_NAME=default-cluster POD_NAME=default-pod\r\nENTRYPOINT [\"./run\"]\r\n```\r\nThe docker image can be found here: https://hub.docker.com/repository/docker/rishabh691/hypertrace-data-config-service (rishabh691/hypertrace-data-config-service:test1)\r\n\r\nFollowing env vars were passed in k8s deployment.\r\n```\r\n - name: JAVA_TOOL_OPTIONS\r\n value: -XX:InitialRAMPercentage=50.0 -XX:MaxRAMPercentage=75.0 -javaagent:/opt/hypertrace/hypertrace-agent-all.jar\r\n - name: HT_SERVICE_NAME\r\n value: data-config-service\r\n - name: HT_REPORTING_ENDPOINT\r\n value: http://hypertrace-oc-collector:9411/api/v2/spans\r\n```\r\nThe service crashes with following error:\r\n```\r\nPicked up JAVA_TOOL_OPTIONS: -XX:InitialRAMPercentage=50.0 -XX:MaxRAMPercentage=75.0 -javaagent:/opt/hypertrace/hypertrace-agent-all.jar\r\n[main] INFO org.hypertrace.agent.core.config.HypertraceConfig - Config loaded: {\"serviceName\":\"data-config-service\",\"reporting\":{\"endpoint\":\"http://hypertrace-oc-collector:9411/api/v2/spans\",\"opa\":{\"endpoint\":\"http://opa.traceableai:8181/\",\"pollPeriodSeconds\":30}},\"dataCapture\":{\"httpHeaders\":{\"request\":true,\"response\":true},\"httpBody\":{\"request\":true,\"response\":true},\"rpcMetadata\":{\"request\":true,\"response\":true},\"rpcBody\":{\"request\":true,\"response\":true},\"bodyMaxSizeBytes\":131072},\"propagationFormats\":[\"TRACECONTEXT\"]}\r\n[opentelemetry.auto.trace 2021-02-07 12:59:11:966 +0000] [main] INFO io.opentelemetry.javaagent.tooling.VersionLogger - opentelemetry-javaagent - version: 0.9.7\r\n[opentelemetry.auto.trace 2021-02-07 12:59:12:169 +0000] [main] INFO org.hypertrace.agent.core.config.HypertraceConfig - Config loaded: {\"serviceName\":\"data-config-service\",\"reporting\":{\"endpoint\":\"http://hypertrace-oc-collector:9411/api/v2/spans\",\"opa\":{\"endpoint\":\"http://opa.traceableai:8181/\",\"pollPeriodSeconds\":30}},\"dataCapture\":{\"httpHeaders\":{\"request\":true,\"response\":true},\"httpBody\":{\"request\":true,\"response\":true},\"rpcMetadata\":{\"request\":true,\"response\":true},\"rpcBody\":{\"request\":true,\"response\":true},\"bodyMaxSizeBytes\":131072},\"propagationFormats\":[\"TRACECONTEXT\"]}\r\n[opentelemetry.auto.trace 2021-02-07 12:59:12:583 +0000] [main] INFO io.opentelemetry.javaagent.tooling.PropagatorsInitializer - Added tracecontext propagator\r\n[opentelemetry.auto.trace 2021-02-07 12:59:14:280 +0000] [main] INFO io.opentelemetry.javaagent.tooling.OpenTelemetryInstaller - Installed span exporter: io.opentelemetry.exporter.zipkin.ZipkinSpanExporter\r\n[opentelemetry.auto.trace 2021-02-07 12:59:17:082 +0000] [main] WARN io.opentelemetry.javaagent.tooling.InstrumentationModule - Helper classes and resources won't be injected if no types are instrumented: methods\r\nHypertrace agent started, version: 0.9.7\r\n2021-02-07 12:59:30.247 [main] INFO o.h.c.s.PlatformServiceLauncher - Trying to start PlatformService ...\r\n2021-02-07 12:59:30.355 [main] WARN o.h.c.s.c.ConfigUtils - Cannot find Property: bootstrap.config.uri in neither JVM parameter nor OS environment\r\n2021-02-07 12:59:30.440 [main] WARN o.h.c.s.c.ConfigUtils - Cannot find Property: container.name in neither JVM parameter nor OS environment\r\n2021-02-07 12:59:30.440 [main] INFO o.h.c.s.c.DirectoryBasedConfigClient - Trying to compile configs under directory: /app/resources/configs\r\n2021-02-07 12:59:30.441 [main] INFO o.h.c.s.c.DirectoryBasedConfigClient - Loading config from path: /app/resources/configs/hypertrace-data-config-service/application.conf\r\n[opentelemetry.auto.trace 2021-02-07 12:59:30:833 +0000] [opentelemetry-exec-shutdown-hook] WARN io.opentelemetry.javaagent.tooling.CommonTaskExecutor - Periodic task scheduler is shutdown. Will not run: cleaner for {}\r\n2021-02-07 12:59:32.357 [main] INFO o.h.c.s.c.DirectoryBasedConfigClient - Overrided Configs are listed below:\r\n2021-02-07 12:59:32.431 [main] INFO o.h.c.s.c.ConfigUtils - service.name = Unquoted(\"hypertrace-data-config-service\")\r\n2021-02-07 12:59:32.446 [main] INFO o.h.c.s.c.ConfigUtils - service.admin.port = ConfigInt(9013)\r\n2021-02-07 12:59:32.533 [main] INFO o.h.c.s.c.ConfigUtils - main.class = Unquoted(\"org.hypertrace.service.HypertraceDataConfigService\")\r\n2021-02-07 12:59:32.534 [main] INFO o.h.c.s.c.ConfigUtils - service.port = ConfigInt(9012)\r\n2021-02-07 12:59:33.150 [main] WARN o.h.c.s.c.ConfigUtils - Cannot find Property: container.name in neither JVM parameter nor OS environment\r\n2021-02-07 12:59:33.150 [main] INFO o.h.c.s.c.DirectoryBasedConfigClient - Trying to compile configs under directory: /app/resources/configs\r\n2021-02-07 12:59:33.150 [main] INFO o.h.c.s.c.DirectoryBasedConfigClient - Loading config from path: /app/resources/configs/hypertrace-data-config-service/application.conf\r\n2021-02-07 12:59:33.156 [main] INFO o.h.c.s.c.DirectoryBasedConfigClient - Overrided Configs are listed below:\r\n2021-02-07 12:59:33.231 [main] INFO o.h.c.s.c.ConfigUtils - service.name = Unquoted(\"hypertrace-data-config-service\")\r\n2021-02-07 12:59:33.231 [main] INFO o.h.c.s.c.ConfigUtils - service.admin.port = ConfigInt(9013)\r\n2021-02-07 12:59:33.231 [main] INFO o.h.c.s.c.ConfigUtils - main.class = Unquoted(\"org.hypertrace.service.HypertraceDataConfigService\")\r\n2021-02-07 12:59:33.233 [main] INFO o.h.c.s.c.ConfigUtils - service.port = ConfigInt(9012)\r\n2021-02-07 12:59:33.234 [main] INFO o.h.c.s.PlatformService - Starting the service by using this metrics configuration Config(SimpleConfigObject({}))\r\n2021-02-07 12:59:34.143 [main] INFO o.h.c.s.m.PlatformMetricsRegistry - Trying to init PrometheusReporter\r\n2021-02-07 12:59:34.547 [main] INFO o.h.c.s.m.PlatformMetricsRegistry - Setting default tags for all metrics to: {app=hypertrace-data-config-service}\r\n[opentelemetry.auto.trace 2021-02-06 19:35:08:046 +0000] [Thread-0] WARN io.opentelemetry.javaagent.tooling.CommonTaskExecutor - Periodic task scheduler is shutdown. Will not run: cleaner for {}\r\n2021-02-06 19:35:08.133 [Thread-0] ERROR o.h.c.s.PlatformServiceLauncher - Error while calling quitquitquit\r\norg.apache.http.conn.HttpHostConnectException: Connect to 127.0.0.1:15020 [/127.0.0.1] failed: Connection refused (Connection refused)\r\n\tat org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:156) ~[httpclient-4.5.13.jar:4.5.13]\r\n\tat org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376) ~[httpclient-4.5.13.jar:4.5.13]\r\n\tat org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393) ~[httpclient-4.5.13.jar:4.5.13]\r\n\tat org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) ~[httpclient-4.5.13.jar:4.5.13]\r\n\tat org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) ~[httpclient-4.5.13.jar:4.5.13]\r\n\tat org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[httpclient-4.5.13.jar:4.5.13]\r\n```\r\nAm I misconfiguring the agent or missing something? ","author":{"url":"https://github.com/findingrish","@type":"Person","name":"findingrish"},"datePublished":"2021-02-07T13:39:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/255/javaagent/issues/255"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cdd0c0ba-dd87-ea2e-8cd5-f565e037c7f1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DDF4:49C5:6706F0:95E41D:6A4E0DB3 |
| html-safe-nonce | 6ecfbf59f4f6e1fc309c0efa8b08005a21cb578d8a07e363505f1297303a41fa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEREY0OjQ5QzU6NjcwNkYwOjk1RTQxRDo2QTRFMERCMyIsInZpc2l0b3JfaWQiOiIyMjE2NDMzOTMzNzY3MDE5OTU2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7e43045bf13ae30488879597578fda066af5c96af3de0754c16e4f65adc089d0 |
| hovercard-subject-tag | issue:802954978 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/hypertrace/javaagent/255/issue_layout |
| twitter:image | https://opengraph.githubassets.com/10557593e68aa12fb272743cf37f4522a3407a0ca4d29db97c3c376f87fa8fb1/hypertrace/javaagent/issues/255 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/10557593e68aa12fb272743cf37f4522a3407a0ca4d29db97c3c376f87fa8fb1/hypertrace/javaagent/issues/255 |
| og:image:alt | Tried instrumenting one of the hypertrace java service (https://github.com/hypertrace/hypertrace-service/tree/main/hypertrace-data-config-service) with java agent. The service was deployed in k8s c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | findingrish |
| hostname | github.com |
| expected-hostname | github.com |
| None | df0492960db29b4938cb72070351d6b1d0c6c0767b27ceb8394bbf4fcc0223c6 |
| turbo-cache-control | no-preview |
| go-import | github.com/hypertrace/javaagent git https://github.com/hypertrace/javaagent.git |
| octolytics-dimension-user_id | 65374698 |
| octolytics-dimension-user_login | hypertrace |
| octolytics-dimension-repository_id | 302314733 |
| octolytics-dimension-repository_nwo | hypertrace/javaagent |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 302314733 |
| octolytics-dimension-repository_network_root_nwo | hypertrace/javaagent |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 51470c353b8a1f52a88d3e3cc2014b17ab8cc1ce |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width