Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update usages of faas.id resource attribute to faas.instance #679

Closed
damemi opened this issue Jul 18, 2023 · 8 comments
Closed

Update usages of faas.id resource attribute to faas.instance #679

damemi opened this issue Jul 18, 2023 · 8 comments
Assignees
Labels
bug Something isn't working priority: p1

Comments

@damemi
Copy link
Contributor

damemi commented Jul 18, 2023

Our resource detectors and monitored resource mappings currently rely on semconv v1.18, which has faas.id, which we use for the Generic Task (Cloud Run) resource.

As of semconv v1.19.0, faas.id is removed(/replaced with cloud.resource_id).

So, when we update to semconv v1.19, we'll need to update our usages of faas.id to faas.instance:

This attribute is also used in our code samples for GMP-Cloud Run integration: https://github.com/GoogleCloudPlatform/golang-samples/blob/e4eddad4457dc10f0fabb1b6f4c1906bea46aedc/run/custom-metrics/collector/collector-config.yaml#L45, which will need to be updated and the matching docs pages manually redeployed.

@aabmass aabmass added bug Something isn't working priority: p1 labels Jul 31, 2023
@dashpole
Copy link
Contributor

dashpole commented Aug 4, 2023

Proposed Plan:

  1. Update GMP exporter to map faas.name to job, and faas.instance to instance.
  2. Update e2e test framework to expect the new attribute.
  3. Update Resource detectors (across languages) to detect faas.instance instead of faas.id, and update metric exporter mapping.
  4. Wait ~3 months to give time for collector releases to happen.
  5. Remove the resource processor from the sample.

For anyone using our current documentation, they would not be broken at any point.

@aabmass do you think that plan makes sense?

@aabmass
Copy link
Contributor

aabmass commented Aug 4, 2023

SGTM. Do we consider this breaking for the genericTask mapping Mike mentioned? This would apply to users sending to Cloud Monitoring (not GMP). I think it should be ok

@dashpole
Copy link
Contributor

dashpole commented Aug 7, 2023

It is breaking unless they are using our resource detector, which seems OK. We should recommend people use our resource detectors wherever possible.

@dashpole
Copy link
Contributor

I need to update contrib for golang before I can update the this repo

@dashpole
Copy link
Contributor

dashpole commented Sep 6, 2023

The collector's resource detector needs to be updated. I had forgotten about that.

@aabmass
Copy link
Contributor

aabmass commented Oct 5, 2023

As of semconv v1.19.0, faas.id is removed(/replaced with cloud.resource_id).

So, when we update to semconv v1.19, we'll need to update our usages of faas.id to faas.instance

Sorry it's been a while and I'm confused again. If faas.id was renamed to cloud.resource_id, shouldn't we be using that? Or were we incorrectly using faas.id in the first place?

@dashpole
Copy link
Contributor

dashpole commented Oct 6, 2023

We were incorrectly using faas.id in the first place. faas.id was meant to be the full resource name (e.g. projects/my-project/locations/us-central1/functions/my-function)

codeboten pushed a commit to open-telemetry/opentelemetry-collector-contrib that referenced this issue Oct 6, 2023
…26486)

Context:
GoogleCloudPlatform/opentelemetry-operations-go#679

faas.id was removed from the semantic conventions:
open-telemetry/opentelemetry-specification#3188

We were previously using it improperly to store the instance id of the
faas, which should be mapped to faas.instance instead.

---------

Co-authored-by: Alex Boten <aboten@lightstep.com>
@dashpole
Copy link
Contributor

dashpole commented Oct 6, 2023

We can track documentation updates in GoogleCloudPlatform/opentelemetry-cloud-run#6. All other work is done

@dashpole dashpole closed this as completed Oct 6, 2023
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this issue Nov 12, 2023
…pen-telemetry#26486)

Context:
GoogleCloudPlatform/opentelemetry-operations-go#679

faas.id was removed from the semantic conventions:
open-telemetry/opentelemetry-specification#3188

We were previously using it improperly to store the instance id of the
faas, which should be mapped to faas.instance instead.

---------

Co-authored-by: Alex Boten <aboten@lightstep.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: p1
Projects
None yet
Development

No branches or pull requests

3 participants