Skip to content

[FEATURE]: Use relative paths for resource names in opensearch integration #4474

Open
@minamijoyo

Description

@minamijoyo

Gem Name

No response

Gem Version(s)

No response

Describe the goal of the feature

The OpenSearch resource names use relative paths, the same as Elasticsearch.

Is your feature request related to a problem?

While migrating from Elasticsearch to OpenSearch, I noticed that the resource names in Datadog's APM are not relative paths in OpenSearch, but full paths, which include a fully qualified domain name. The problem is that no matter how short the domain name the user can specify, in VPC mode, the length of FQDN will be 60-70 characters.
While I understand the idea that different domain names should be treated as different resources, for practical purposes, the resource name is too long on the screen, and the end is not displayed, resulting in resources that cannot be distinguished.

Note that the original elasticsearch integration uses relative paths as resource names.
https://github.com/DataDog/dd-trace-rb/blob/v2.12.1/lib/datadog/tracing/contrib/elasticsearch/patcher.rb#L49-L50
https://github.com/DataDog/dd-trace-rb/blob/v2.12.1/lib/datadog/tracing/contrib/opensearch/patcher.rb#L51-L52

Besides elasticsearch, the mysql integration also could theoretically have multiple instances in a single application, but the endpoint domain name is not included in the resource name. This is not particularly problematic because multiple instances are rare. Given that, I believe the same is true for the opensearch integration. I'm unsure whether the difference between Elasticsearch integration and OpenSearch one is intentional, so I submitted this as a feature request.

Describe alternatives you've considered

No response

Additional context

No response

How does Datadog help you?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    communityWas opened by a community memberfeature-requestA request for a new feature or change to an existing one

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions