Repository navigation
Remove MR mapping for cloud run and cloud functions - #250
Conversation
…latform#249) * Add readme with steps to run the example * Add script to run example as Cloud Run Job * Replace GCR with Artifact Registry * Rename GOOGLE_CLOUD_RUN_JOB_REGION to GOOGLE_CLOUD_RUN_REGION
As per the exporter spec, we do not support pushing metric to cloud-run. This change will cause cloud_run_revision to be treated as a generic_task.
Cloud functions is also not writable for user-defined metrics, therefore removing its explicit mapping so that it defaults to generic_task.
|
Merge-on-green attempted to merge your PR for 6 hours, but it was not mergeable because either one of your required status checks failed, one of your required reviews was not approved, or there is a do not merge label. Learn more about your required status checks here: https://help.github.com/en/github/administering-a-repository/enabling-required-status-checks. You can remove and reapply the label to re-run the bot. |
punya
left a comment
There was a problem hiding this comment.
If we implement a Cloud Logging exporter, we'd want to use cloud_run_revision rather than generic_node. That makes me wonder if our resource detection logic should take a signal type parameter in addition to an OTel resource so that we can take it into account.
| curl -H "traceparent: 00-ff000000000000000000000000000041-ff00000000000041-01" ${cluster_ip} | ||
| ``` | ||
|
|
||
| ## Running in Google Cloud Run |
There was a problem hiding this comment.
In future, please keep unrelated changes (such as examples) in separate PRs.
| This will deploy the containerized application to Cloud Run and you will be presented with a service URL which would look something like - | ||
|
|
||
| ```text | ||
| Service URL: https://hello-autoinstrument-cloud-run-m43qtxry5q-uc.a.run.app | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Now that we're using the proxy, the service URL should no longer matter right?
There was a problem hiding this comment.
Yes, this is just to clarify what to expect in case of a successful deployment. Also, I believe now we are adding the cURL instructions back, so this would be useful there.
|
When is planned release with these changes? |
…races In the trace exporter, stop passing `includeUnsupportedResources` param (false by default). This param controls if the mapping function should return `cloud_run_revision` and `cloud_function` monitored resources. This is equivalent to what we do in [Go](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/blob/v0.44.0/internal/resourcemapping/resourcemapping.go) and Java GoogleCloudPlatform/opentelemetry-operations-java#250 Deprecate the `includeUnsupportedResources` parameter by splitting the function def into a deprecated and non-deprecated overload. It is no longer needed but the package is marked stable so I will save the breaking change.
…races (#635) In the trace exporter, stop passing `includeUnsupportedResources` param (false by default). This param controls if the mapping function should return `cloud_run_revision` and `cloud_function` monitored resources. This is equivalent to what we do in [Go](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/blob/v0.44.0/internal/resourcemapping/resourcemapping.go) and Java GoogleCloudPlatform/opentelemetry-operations-java#250 Deprecate the `includeUnsupportedResources` parameter by splitting the function def into a deprecated and non-deprecated overload. It is no longer needed but the package is marked stable so I will save the breaking change.
Fix #248
This PR removes the explicit mapping to following Monitored Resource Types:
These mappings are removed since these MR types do not support user-defined metrics. By removing their mappings, the exporter will by default map them to generic_task.
The PR also adds a convenience script that allows autoinstrument example to be able to run in cloud-run environment.
This script was used to verify that metrics can be sent from a cloud-run environment and they appear in Cloud Monitoring under Generic Task
Similar to work already done in - GoogleCloudPlatform/opentelemetry-operations-go#570