Skip to content

Map faas.* attributes to generic_task in resource mapping#273

Merged
dashpole merged 5 commits intoGoogleCloudPlatform:mainfrom
dashpole:faas_to_generic_task
Sep 28, 2023
Merged

Map faas.* attributes to generic_task in resource mapping#273
dashpole merged 5 commits intoGoogleCloudPlatform:mainfrom
dashpole:faas_to_generic_task

Conversation

@dashpole
Copy link
Copy Markdown
Contributor

@dashpole dashpole commented Aug 22, 2023

Fixes #272

Question: should faas.* attributes take precedence over service.* attributes if they are present? If they do, it might break users who are currently using service.* attributes. If we don't, the default service (unknown) will take precedence over faas.name

@dashpole dashpole force-pushed the faas_to_generic_task branch 4 times, most recently from c2757b2 to 0bebac5 Compare August 22, 2023 18:04
@dashpole
Copy link
Copy Markdown
Contributor Author

dashpole commented Aug 23, 2023

Ideally: If a user sets a service.name, use that. Otherwise, fall back to faas.name.

Options:

  1. resource detector detects service.name as faas.name. (would this cause schema URL conflicts?)
  2. Check for serivce.name first, then fall back to faas.name. But ignore the unknown service name.
  3. Faas.* takes precedence over service.name (this PR)

@dashpole
Copy link
Copy Markdown
Contributor Author

I've proposed option 2 in a design document.

@dashpole dashpole force-pushed the faas_to_generic_task branch 6 times, most recently from 41279e6 to 4f2b35b Compare August 31, 2023 20:38
@dashpole dashpole marked this pull request as ready for review August 31, 2023 20:42
@dashpole dashpole requested a review from a team as a code owner August 31, 2023 20:42
@dashpole dashpole force-pushed the faas_to_generic_task branch 7 times, most recently from 36d6119 to f235f3b Compare September 19, 2023 16:27
@dashpole dashpole force-pushed the faas_to_generic_task branch from f235f3b to 12131df Compare September 19, 2023 16:30
@dashpole
Copy link
Copy Markdown
Contributor Author

I think this is good to go @aabmass.

Comment thread opentelemetry-resourcedetector-gcp/tests/test_mapping.py
@dashpole dashpole force-pushed the faas_to_generic_task branch from 528f845 to 4ea1d6d Compare September 22, 2023 16:18
Copy link
Copy Markdown
Collaborator

@aabmass aabmass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accept faas.name and faas.id for mapping metrics to generic_task

2 participants