Static string in CloudTraceConfiguration::project_id
abdolence opened this issue · comments
Hey, I was working with some previous builds of this library that used normal String
type for project_id
for Google traces and it was working fine. Now I tried to upgrade to 0.6 and I see it was changed to &static str
.
Since commonly GCP project IDs are coming from configurations, environment variables, etc, this made now it more complicated to define.
What is the reason it is defined that way?
I would want to avoid using Box::leak
and hacks just to specify project ids.
That's a fair point. For my own uses, project_id
and similar Google-level configuration was static, but of course it makes sense that an Env
-based String
configuration would be useful, too. That seems worth a patch, stand by.
@abdolence just published v0.6.1 with project_id
configured with an owned String
. Thanks for opening this issue!
Thanks for the quick fix!