Does Dynatrace deduplicate writes when a custom plugin re-executes after a failure?
0 reputation · 20 Apr 2023, 02:57 UTC
0 reputation · 20 Apr 2023, 02:57 UTC
We run several custom OneAgent plugins that push measurements into our Dynatrace managed cluster. When a plugin execution fails partway through, the plugin is re-executed on the next cycle, and I want to confirm whether the retried execution can produce duplicate data points or events for the same timestamp.
For built-in paths I understand the platform handles this reasonably well: PurePath segments rely on request IDs to detect retried calls, the Events API treats payloads as idempotent when a stable eventId is supplied, and problem detection deduplicates by fingerprint. What I cannot find documented is whether custom plugin executions get any comparable deduplication, or whether the caller-side plugin code is fully responsible for idempotency, similar to direct API ingestion that bypasses OneAgent.
Our environment is a managed cluster, so SaaS-only behavior would not necessarily apply, and I would like to avoid relying on assumptions that vary across releases.
Does Dynatrace apply any server-side deduplication to measurements or events submitted by a retried custom plugin execution? If not, is supplying a deterministic timestamp or identifier per measurement the intended idempotency mechanism? Is there a documented way to verify duplicate suppression from the UI or API?
32775 reputation · 20 Apr 2023, 08:57 UTC
No. Dynatrace does not provide documented server-side deduplication for measurements submitted by a retried custom OneAgent plugin execution. If a plugin fails partway through and re-executes on the next cycle, the platform ingests whatever the retry submits, and identical metric name + timestamp combinations can land as duplicate data points in your managed cluster. The idempotency mechanisms you're familiar with — request IDs on PurePath, stable eventId on the Events API, fingerprinting in problem detection — are caller-supplied or pipeline-specific features, not a general safety net for custom plugin output.
Confirmed: The deduplication you see in built-in paths works because the caller or the pipeline supplies a stable identity (request ID, eventId, fingerprint). Custom plugin executions have no equivalent documented identity mechanism inside the OneAgent ingestion path.
Likely, but verify for your release: A plugin retry re-runs the full plugin logic and the resulting measurements are ingested as-is, without suppression of points matching a prior failed run. This is the behavior consistent with how the platform treats plugin output, but deduplication internals can differ between SaaS and managed clusters and can change across releases without compatibility guarantees, so treat this as the safe assumption rather than a documented promise.
Since the platform won't deduplicate for you, make the plugin idempotent:
eventId derived from the source data (e.g., a hash of entity + timestamp + type), mirroring the Events API idempotency contract.There is no documented UI flag or API endpoint that retroactively merges or suppresses duplicates from plugin retries. To check whether you're affected:
eventId via the Events API in a test environment and confirm only one event appears; then repeat without an eventId to see the contrast.Because behavior can vary across managed releases, the only assumption worth building on is the conservative one: the caller (your plugin) owns idempotency. If you want a definitive statement for your exact cluster version, that's a question for Dynatrace support with your cluster build number — it changes the recommendation only if they confirm a version-specific dedup feature you could rely on instead.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.