-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add Django 5 Collector app #256
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copy django5-celery-opentelemetry and update the application name in docker-compose.yml
The collector uses PUSH_API_KEY instead of the previously used APPSIGNAL_PUSH_API_KEY. To remedy that in the current setup, add a line to the appsignal_key.env.rb template file that sets that in addition to the APPSIGNAL_PUSH_API_KEY environment variable.
Use appsignal-collector instead of appsignal-agent in django5-celery-collector. Also set the PUSH_API_ENDPOINT to push to staging, as the required logic for the collector hasn't been deployed to production just yet.
Update the configuration in django5-celery-collector to use the colelctor endpoint instead of the agent one, in both settings.py and tasks.py: 1. Update the configuration to adhere to the changes that have been made in the configuration names: "appsignal.config.app_name" -> "appsignal.config.name" "appsignal.config.app_environment" -> "appsignal.config.environment" 2. Set the "appsignal.config.revision" configuration option to a static value. Although there was an commented-out implementation to determine the revision, that didn't work as the git repository isn't copied to the Docker container. For now, set the revision to a static value of "test-setups". 3. Set the "host.name" configuration option to the result of socket.gethostname().
tombruijn
approved these changes
Jan 23, 2025
luismiramirez
approved these changes
Jan 24, 2025
unflxw
approved these changes
Jan 27, 2025
This comment has been minimized.
This comment has been minimized.
1 similar comment
This is a message from the daily scheduled checks. |
This reverts commit c65d0d4.
Make testing of metrics possible by setting up an metrics exporter and sending the types of metrics we support. I copied the exporter config from our Python package.
Debug logs help with debugging the collector's behavior.
The collector data can now be received by production, so let's remove the staging config. If you do want to push to staging, set these env vars in the `appsignal_key.env` file in the root of the project.
Make sure we test if the apps actually works.
d3f376d
to
e886e40
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Aside from the existing OpenTelemetry apps, add one that uses the new collector. This app is a copy of the django5-celery-opentelemetry app with the appsignal-collector added to the compose instead of appsignal-agent.
There are three things to keep in mind:
This test app reports to staging, and has the
PUSH_API_ENDPOINT
set in its compose file, because the collector only works on staging right now. This should be removed after the required changes are deployed to production.Since the collector uses a PUSH_API_KEY environment variable as opposed to the APPSIGNAL_PUSH_API_KEY used previously, this PR adds the former to the
appsignal_key.env
template file in c65d0d4 with the same value as the APPSIGNAL_PUSH_API_KEY. Regenerating the file before starting the collector properly sets the key.The now-required "appsignal.config.revision" configuration option is set to a static value. Although there was an commented-out implementation to determine the revision, that didn't work as the git repository isn't copied to the Docker container.