Skip to content

Unable to derive from ResourceDetector and create a Resource #3246

@dbarker

Description

@dbarker

Describe your environment

main branch at 57114c5

Steps to reproduce
Derive a custom resource detector from ResourceDetector and try to call the constructor of Resource.

What is the expected behavior?
Compiles and creates a resource with the provided attributes

What is the actual behavior?
Fails to compile

Additional context

  • Resource adds the OTELResourceDetector as a friend here but not ResourceDetector.
  • ResourceDetector doesn't provide a protected method to create a resource with just the attributes detected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions