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

Universal profiling integration: Add stacktrace-IDs to transactions #3615

Merged
merged 10 commits into from
May 6, 2024
Prev Previous commit
Next Next commit
made config options public
JonasKunz committed May 3, 2024
commit cd5760fd0fae0aa1aa0556c9aaaa9f68c8dfd45c
Original file line number Diff line number Diff line change
@@ -29,15 +29,15 @@ public class UniversalProfilingConfiguration extends ConfigurationOptionProvider

private final ConfigurationOption<Boolean> enabled = ConfigurationOption.booleanOption()
.key("universal_profiling_integration_enabled")
.tags("added[1.50.0]", "internal")
.tags("added[1.50.0]")
.configurationCategory(PROFILING_CATEGORY)
.description("If enabled, the apm agent will correlate it's transaction with the profiling data from elastic universal profiling running on the same host.")
.buildWithDefault(false);

private final ConfigurationOption<Integer> bufferSize = ConfigurationOption.integerOption()
.key("universal_profiling_integration_buffer_size")
.addValidator(isInRange(64, Integer.MAX_VALUE))
.tags("added[1.50.0]", "internal")
.tags("added[1.50.0]")
.configurationCategory(PROFILING_CATEGORY)
.description("The feature needs to buffer ended local-root spans for a short duration to ensure that all of its profiling data has been received." +
"This configuration option configures the buffer size in number of spans. " +
@@ -48,7 +48,7 @@ public class UniversalProfilingConfiguration extends ConfigurationOptionProvider

private final ConfigurationOption<String> socketDir = ConfigurationOption.stringOption()
.key("universal_profiling_integration_socket_dir")
.tags("added[1.50.0]", "internal")
.tags("added[1.50.0]")
.configurationCategory(PROFILING_CATEGORY)
.description("The extension needs to bind a socket to a file for communicating with the universal profiling host agent." +
"This configuration option can be used to change the location. " +
100 changes: 100 additions & 0 deletions docs/configuration.asciidoc
Original file line number Diff line number Diff line change
@@ -179,6 +179,9 @@ Click on a key to get more information.
** <<config-agent-reporter-health-metrics>>
** <<config-agent-background-overhead-metrics>>
* <<config-profiling>>
** <<config-universal-profiling-integration-enabled>>
** <<config-universal-profiling-integration-buffer-size>>
** <<config-universal-profiling-integration-socket-dir>>
** <<config-profiling-inferred-spans-enabled>>
** <<config-profiling-inferred-spans-logging-enabled>>
** <<config-profiling-inferred-spans-sampling-interval>>
@@ -2673,6 +2676,77 @@ Enables metrics which capture the resource consumption of agent background tasks
<titleabbrev>Profiling</titleabbrev>
++++

// This file is auto generated. Please make your changes in *Configuration.java (for example CoreConfiguration.java) and execute ConfigurationExporter
[float]
[[config-universal-profiling-integration-enabled]]
==== `universal_profiling_integration_enabled` (added[1.50.0])

If enabled, the apm agent will correlate it's transaction with the profiling data from elastic universal profiling running on the same host.




[options="header"]
|============
| Default | Type | Dynamic
| `false` | Boolean | false
|============


[options="header"]
|============
| Java System Properties | Property file | Environment
| `elastic.apm.universal_profiling_integration_enabled` | `universal_profiling_integration_enabled` | `ELASTIC_APM_UNIVERSAL_PROFILING_INTEGRATION_ENABLED`
|============

// This file is auto generated. Please make your changes in *Configuration.java (for example CoreConfiguration.java) and execute ConfigurationExporter
[float]
[[config-universal-profiling-integration-buffer-size]]
==== `universal_profiling_integration_buffer_size` (added[1.50.0])

The feature needs to buffer ended local-root spans for a short duration to ensure that all of its profiling data has been received.This configuration option configures the buffer size in number of spans. The higher the number of local root spans per second, the higher this buffer size should be set.
The agent will log a warning if it is not capable of buffering a span due to insufficient buffer size. This will cause the span to be exported immediately instead with possibly incomplete profiling correlation data.




[options="header"]
|============
| Default | Type | Dynamic
| `4096` | Integer | false
|============


[options="header"]
|============
| Java System Properties | Property file | Environment
| `elastic.apm.universal_profiling_integration_buffer_size` | `universal_profiling_integration_buffer_size` | `ELASTIC_APM_UNIVERSAL_PROFILING_INTEGRATION_BUFFER_SIZE`
|============

// This file is auto generated. Please make your changes in *Configuration.java (for example CoreConfiguration.java) and execute ConfigurationExporter
[float]
[[config-universal-profiling-integration-socket-dir]]
==== `universal_profiling_integration_socket_dir` (added[1.50.0])

The extension needs to bind a socket to a file for communicating with the universal profiling host agent.This configuration option can be used to change the location. Note that the total path name (including the socket) must not exceed 100 characters due to OS restrictions.
If unset, the value of the `java.io.tmpdir` system property will be used.




[options="header"]
|============
| Default | Type | Dynamic
| `<none>` | String | false
|============


[options="header"]
|============
| Java System Properties | Property file | Environment
| `elastic.apm.universal_profiling_integration_socket_dir` | `universal_profiling_integration_socket_dir` | `ELASTIC_APM_UNIVERSAL_PROFILING_INTEGRATION_SOCKET_DIR`
|============

// This file is auto generated. Please make your changes in *Configuration.java (for example CoreConfiguration.java) and execute ConfigurationExporter
[float]
[[config-profiling-inferred-spans-enabled]]
@@ -4694,6 +4768,32 @@ Example: `5ms`.
# Profiling #
############################################

# If enabled, the apm agent will correlate it's transaction with the profiling data from elastic universal profiling running on the same host.
#
# This setting can not be changed at runtime. Changes require a restart of the application.
# Type: Boolean
# Default value: false
#
# universal_profiling_integration_enabled=false

# The feature needs to buffer ended local-root spans for a short duration to ensure that all of its profiling data has been received.This configuration option configures the buffer size in number of spans. The higher the number of local root spans per second, the higher this buffer size should be set.
# The agent will log a warning if it is not capable of buffering a span due to insufficient buffer size. This will cause the span to be exported immediately instead with possibly incomplete profiling correlation data.
#
# This setting can not be changed at runtime. Changes require a restart of the application.
# Type: Integer
# Default value: 4096
#
# universal_profiling_integration_buffer_size=4096

# The extension needs to bind a socket to a file for communicating with the universal profiling host agent.This configuration option can be used to change the location. Note that the total path name (including the socket) must not exceed 100 characters due to OS restrictions.
# If unset, the value of the `java.io.tmpdir` system property will be used.
#
# This setting can not be changed at runtime. Changes require a restart of the application.
# Type: String
# Default value:
#
# universal_profiling_integration_socket_dir=

# Set to `true` to make the agent create spans for method executions based on
# https://github.com/jvm-profiling-tools/async-profiler[async-profiler], a sampling aka statistical profiler.
#
Loading