Skip to content

Conversation

@robsunday
Copy link
Contributor

robsunday and others added 10 commits December 5, 2025 17:13
Refactoring profiler config methods to use config from the instance property, not form argument
…tivator.java

Co-authored-by: jason plumb <75337021+breedx-splk@users.noreply.github.com>
# Conflicts:
#	profiler/src/main/java/com/splunk/opentelemetry/profiler/LogExporterBuilder.java
#	profiler/src/main/java/com/splunk/opentelemetry/profiler/ProfilerDeclarativeConfiguration.java
#	profiler/src/test/java/com/splunk/opentelemetry/profiler/LogExporterBuilderTest.java
#	profiler/src/test/java/com/splunk/opentelemetry/profiler/ProfilerDeclarativeConfigurationTest.java
@robsunday robsunday requested review from a team as code owners December 12, 2025 12:02

private static final String MEMORY_PROFILER = "memory_profiler";
private static final String MEMORY_EVENT_RATE = "event_rate";
private static final String MEMORY_SAMPLING_INTERVAL = "sampling_interval";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Imo these aren't really interchangeable. Idk whether this counts as nitpicking. We wish to maintain a consistent event rate (or rather we wish to not create too many events). For this we don't really sample at a fixed interval. When using jdk.ObjectAllocationSample event (off by default) jdk will sample to main the desired rate. When we sample ourself we calculate the probability that would give us the desired amount of events and choose the events based on that probability from the set of all events.

Copy link
Contributor Author

@robsunday robsunday Dec 12, 2025

Choose a reason for hiding this comment

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

Both: CPU profiler and Snapshot profiler have sampling_interval option. Memory profiler just got consistent with them. If Rate vs interval is the concern then maybe we should revisit GDI spec. I appreciate the consistency between profilers and languages we just got and I'm not sure if JFR really keeps the rate super stable anyway (nodejs may be even worse)
@breedx-splk - WDYT ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

https://github.com/signalfx/gdi-specification/blob/main/specification/configuration.md#file-based-configuration
Does not have sampling_interval under memory_profiler. My concern is that since we aren't really sampling these periodically using sampling_interval would be misleading.

Language distributions MAY specify additional configuration values in locations where it makes the most sense convention and usability wise.

as far as I can tell we are free to introduce whatever properties we need

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.

2 participants