Test entitiy#2
Open
tharun0064 wants to merge 7 commits into
Open
Conversation
tharun0064
pushed a commit
that referenced
this pull request
Jan 9, 2026
…RVER (#2…" (newrelic#2551) This reverts commit 16ead6f.
tharun0064
pushed a commit
that referenced
this pull request
Apr 23, 2026
newrelic#2751) * feat(redis): add OpenTelemetry synthesis rule with service.instance.id - Add infra_redisinstance_otel synthesis rule - Support service.instance.id identifier pattern - Include required resource attributes (service.name, service.instance.id, host.name, host.id) - Include optional attributes (redis.cluster.name, redis.cluster.enabled, redis.maxmemory, redis.persistence.enabled) - Support both redis. and redis_ metric prefixes - Add K8s and cloud provider attributes - Prevent duplicate entities by making rules mutually exclusive - Update goldenTags with new attributes - Add test case with new attributes pattern - Create definition.stg.yml for staging - Preserve existing server.address:server.port synthesis rule * fix(redis): correct synthesis rule syntax for validation - Remove unsupported anyOf syntax from conditions - Simplify metricName condition to use redis. prefix - Simplify entity trigger to use redis.role present condition - Ensure schema validation passes * feat(redis): update for latest collector and remove service.name - Add otel.library.name condition for latest collector format: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver - Remove service.name from required resource attributes - Update synthesis rule to trigger only on redis.role presence - Support both old otelcol/redisreceiver and new collector formats * feat(redis): update staging file with same collector changes - Add otel.library.name condition for latest collector format in staging - Remove service.name from staging file tags - Keep staging file in sync with main definition * fix(redis): update test data for validation - Add missing eventType field to both test data points - Update test case #2 to use new collector format: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver - Ensure test data matches synthesis rule conditions - Fix validation error for INFRA-REDISINSTANCE synthesis rules * feat(redis): add TTL configurations to host and K8s attributes - Add ttl: P1D to host.name and host.id for dynamic host tracking - Add ttl: P1D to k8s.namespace.name and k8s.pod.name for container lifecycle - Consistent with Kafka broker TTL patterns - Applied to both definition.yml and definition.stg.yml - Ensures proper cleanup of dynamic attributes in containerized environments --------- Co-authored-by: David Gonzalez <davidgonzalez@newrelic.com>
davidgonzalez-nr
pushed a commit
that referenced
this pull request
Jun 23, 2026
… environment (newrelic#2942) The relationship-synthesis validator (validator/tools/validate_relationship_synthesis_rules.js) gathers every `.yml` file under `relationships/synthesis/` into a single flat list and checks `name` uniqueness against one global Map. That doesn't match the runtime semantics documented in README.md: > `.stg` file will replace original in STG while original will be used for > PRODUCTION So `INFRA_X-to-Y.yml` and `INFRA_X-to-Y.stg.yml` never co-exist in any deployed environment, yet the validator treats them as if they did. This forces authors to suffix override identifiers (e.g. `mySuperRule -> mySuperRuleStgOverride`) purely to satisfy CI, even when the override's intent is to *be* the same rule with one specific change for staging — and creates a needless rename on every promotion. This change introduces a new helper, `getRelationshipSynthesisDefinitionsByEnvironment`, that partitions definition files into the two file sets that load in each environment (prod = non-.stg.yml; staging = .stg.yml override if present otherwise the .yml). The validator now runs the existing per-rule checks once per environment with its own name-uniqueness map. Cross-environment collisions are no longer flagged; in-environment collisions still fail (now with the env name in the error message for clarity). Locally tested: - Same `name` across `INFRA_DOCKER_CONTAINER-to-EXT_SERVICE.yml` and `…stg.yml` (the override pair) → passes (was failing before). - Same `name` in two unrelated prod `.yml` files → still fails, with "in the production environment" suffix. - Same `name` in two unrelated `.stg.yml` files → still fails, with "in the staging environment" suffix. - All other rule-local checks (TTL, resolver count, condition/origin) are unchanged; they run once per environment but are idempotent. The existing `getAllRelationshipSynthesisDefinitions` helper is preserved for backward compatibility (no other callers in-tree, but kept to avoid any external references breaking). Followups not in this PR: README.md "Required validation step #2" (`mySuperRule -> mySuperRuleStgOverride`) becomes optional rather than required and should be revised. Backend systems that consume rule names across both environments should be confirmed env-aware before this is merged — `relationships.sourceTypeTarget.count` already facets by `environment`, suggesting the data path is already segmented, but the relationship-approver / synthesis service should be checked.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relevant information
Checklist
identifierwill be unique and valid.