-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Containerapp] az containerapp env telemetry: add command for updating telemetry settings #7199
[Containerapp] az containerapp env telemetry: add command for updating telemetry settings #7199
Conversation
|
rule | cmd_name | rule_message | suggest_message |
---|---|---|---|
containerapp env telemetry | sub group containerapp env telemetry added |
Hi @michaelkira, |
Thank you for your contribution! We will review the pull request and get back to you soon. |
Please fix CI issues. |
src/containerapp/azext_containerapp/containerapp_env_telemetry_decorator.py
Outdated
Show resolved
Hide resolved
src/containerapp/azext_containerapp/containerapp_env_telemetry_decorator.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please resolve the conflict and add two blank lines between functions.
|
||
# Container Apps Telemetry Commands | ||
|
||
helps['containerapp env telemetry data-dog set'] = """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add help information for 'containerapp env telemetry'
|
||
with self.command_group('containerapp env telemetry data-dog', is_preview=True) as g: | ||
g.custom_command('set', 'set_environment_telemetry_data_dog', supports_no_wait=True, exception_handler=ex_handler_factory()) | ||
g.custom_command('delete', 'delete_environment_telemetry_data_dog', supports_no_wait=True, exception_handler=ex_handler_factory()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
confirmation
return self.get_param("enable_open_telemetry_metrics") | ||
|
||
def construct_payload(self): | ||
# Get containerapp env properties of CA we are updating |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does CA mean?
safe_set(self.managed_env_def, "properties", "openTelemetryConfiguration", "tracesConfiguration", "destinations", value=existing_traces) | ||
elif not self.get_argument_enable_open_telemetry_traces() and DATA_DOG_DEST in existing_traces: | ||
existing_traces.remove(DATA_DOG_DEST) | ||
safe_set(self.managed_env_def, "properties", "openTelemetryConfiguration", "tracesConfiguration", "destinations", value=existing_traces) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicated code with L63 and L67. could we set it outside if
src/containerapp/azext_containerapp/containerapp_env_telemetry_decorator.py
Outdated
Show resolved
Hide resolved
src/containerapp/azext_containerapp/containerapp_env_telemetry_decorator.py
Outdated
Show resolved
Hide resolved
src/containerapp/azext_containerapp/containerapp_env_telemetry_decorator.py
Outdated
Show resolved
Hide resolved
src/containerapp/azext_containerapp/tests/latest/test_containerapp_env_telemetry.py
Show resolved
Hide resolved
* 'az containerapp env telemetry data-dog set': support update environment data dog configuration with --site, --key, --enable-open-telemetry-traces and --enable-open-telemetry-metrics | ||
* 'az containerapp env telemetry data-dog delete': support delete environment data dog configuration | ||
* 'az containerapp env telemetry app-insights set': support update environment app insights configuration with --connection-string, --enable-open-telemetry-traces and --enable-open-telemetry-logs | ||
* 'az containerapp env telemetry app-insights delete': support delete environment app insights configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move to the history.rst
src/containerapp/azext_containerapp/containerapp_env_telemetry_decorator.py
Show resolved
Hide resolved
src/containerapp/azext_containerapp/containerapp_env_telemetry_decorator.py
Show resolved
Hide resolved
time.sleep(5) | ||
containerapp_env = self.cmd('containerapp env show -g {} -n {}'.format(resource_group, env_name)).get_output_in_json() | ||
|
||
self.cmd('containerapp env show -n {} -g {}'.format(env_name, resource_group), checks=[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
recommend to delete env in the end of test
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>
locally? (pip install azdev
required)python scripts/ci/test_index.py -q
locally? (pip install wheel==0.30.0
required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.json
automatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json
.