def METHOD_NAME(service_name: str):
    import os
    from opentelemetry.semconv.resource import ResourceAttributes
    attributes = {ResourceAttributes.SERVICE_NAME: service_name}
    for attribute in ENV_RESOURCE_ATTRIBUTES:
        if attribute in os.environ:
            attributes[ResourceAttributes.__dict__[attribute]] = os.environ[attribute]
    return attributes