Skip to content

Does not send data to elastic #1544

@mjr

Description

@mjr

Events are not arriving in elastic, some messages appear when executing elasticapm test.

To Reproduce

  1. Check this repository: https://github.com/mjr/test-django-elasticapm/
  2. Run python manage.py elasticapm test
  3. Nothing appears in the elastic panel

Environment (please complete the following information)

  • OS: [e.g. Linux]
  • Python version: 3.10.4
  • Framework and version: Django 4.0.4
  • APM Server version: 7+
  • Agent version: elastic-apm 6.9.1

Additional context

$ python manage.py elasticapm test
 does not match pattern ^[a-zA-Z0-9 _-]+$
Could not register elasticapm.metrics.sets.cpu.CPUMetricSet metricset: psutil not found. Install it to get system and process metrics
 does not match pattern ^[a-zA-Z0-9 _-]+$
Could not register elasticapm.metrics.sets.cpu.CPUMetricSet metricset: psutil not found. Install it to get system and process metrics
Client object is being set more than once
Stack (most recent call last):
  File "/Users/mjr/Workspace/test-elasticapm/.venv/../manage.py", line 22, in <module>
    main()
  File "/Users/mjr/Workspace/test-elasticapm/.venv/../manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "/Users/mjr/Workspace/test-elasticapm/.venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "/Users/mjr/Workspace/test-elasticapm/.venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 440, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/mjr/Workspace/test-elasticapm/.venv/lib/python3.10/site-packages/django/core/management/base.py", line 414, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/Users/mjr/Workspace/test-elasticapm/.venv/lib/python3.10/site-packages/django/core/management/base.py", line 460, in execute
    output = self.handle(*args, **options)
  File "/Users/mjr/Workspace/test-elasticapm/.venv/lib/python3.10/site-packages/elasticapm/contrib/django/management/commands/elasticapm.py", line 131, in handle
    self.dispatch.get(subcommand, self.handle_command_not_found)(self, subcommand, **options)
  File "/Users/mjr/Workspace/test-elasticapm/.venv/lib/python3.10/site-packages/elasticapm/contrib/django/management/commands/elasticapm.py", line 153, in handle_test
    client = DjangoClient(**config)
  File "/Users/mjr/Workspace/test-elasticapm/.venv/lib/python3.10/site-packages/elasticapm/contrib/django/client.py", line 88, in __init__
    super(DjangoClient, self).__init__(config, **inline)
  File "/Users/mjr/Workspace/test-elasticapm/.venv/lib/python3.10/site-packages/elasticapm/base.py", line 219, in __init__
    set_client(self)
  File "/Users/mjr/Workspace/test-elasticapm/.venv/lib/python3.10/site-packages/elasticapm/base.py", line 682, in set_client
    logger.warning("Client object is being set more than once", stack_info=True)
Trying to send a test error to APM Server using these settings:

SERVICE_NAME:   unknown-python-service
SECRET_TOKEN:   DYVuJGfJTX8brbTKaY
SERVER:         https://28b44e7b03744591a63f086fe3058600.apm.us-east-1.aws.cloud.es.io:443

Success! We tracked the error successfully! 
You should see it in the APM app in Kibana momentarily. 
Look for "TestException: Hi there!" in the Errors tab of the unknown-python-service app

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions