Problem Statement
Railway is a modern PaaS platform to deploy apps being used by lot of devs and startups (I personally use it too!)
Right now, it lacks a native resource detector in the OTel ecosystem and devs must manually parse Railway-provided environment variables (like RAILWAY_ENVIRONMENT_NAME, RAILWAY_SERVICE_NAME, etc) to populate standard OpenTelemetry resource attributes.
Why can this component not be hosted in a different repository?
I feel that the current repo opentelemetry-go-contrib is the home for resource detectors like AWS, GCP, etc. and with open-telemetry/opentelemetry-collector-contrib#48159 under way, I can add the resource detector here and then also add them at collector level in opentelemetry-collector-contrib repo if required (using a thin adapter approach as mentioned in the issue).
Proposed Solution
Create a new package under detectors/railway that implements the resource.Detector interface. The detector will check for the presence of Railway-specific environment variables (refer https://docs.railway.com/variables/reference) and map them to standard semantic conventions, falling back to custom railway.* attributes for Railway platform-specific stuff.
I already have this module ready in one of my personal repos.
Alternatives
I didn't find any existing detectors for Railway...so not having it will force every Railway user to write their own manual mapping logic.
Prior Art
No response
Additional Context
I had to check all the boxes in "Tasks" otherwise it wouldn't let me Create this issue.
Code Owners
@kartikgola
Tasks
Problem Statement
Railway is a modern PaaS platform to deploy apps being used by lot of devs and startups (I personally use it too!)
Right now, it lacks a native resource detector in the OTel ecosystem and devs must manually parse Railway-provided environment variables (like
RAILWAY_ENVIRONMENT_NAME,RAILWAY_SERVICE_NAME, etc) to populate standard OpenTelemetry resource attributes.Why can this component not be hosted in a different repository?
I feel that the current repo
opentelemetry-go-contribis the home for resource detectors like AWS, GCP, etc. and with open-telemetry/opentelemetry-collector-contrib#48159 under way, I can add the resource detector here and then also add them at collector level inopentelemetry-collector-contribrepo if required (using a thin adapter approach as mentioned in the issue).Proposed Solution
Create a new package under
detectors/railwaythat implements theresource.Detectorinterface. The detector will check for the presence of Railway-specific environment variables (refer https://docs.railway.com/variables/reference) and map them to standard semantic conventions, falling back to customrailway.*attributes for Railway platform-specific stuff.I already have this module ready in one of my personal repos.
Alternatives
I didn't find any existing detectors for Railway...so not having it will force every Railway user to write their own manual mapping logic.
Prior Art
No response
Additional Context
I had to check all the boxes in "Tasks" otherwise it wouldn't let me Create this issue.
Code Owners
@kartikgola
Tasks