Skip to content

[Bug] for python-agent, the oap-ui does not show my python serviceName #8444

@little-hang

Description

@little-hang

Search before asking

  • I had searched in the issues and found no similar issues.

Apache SkyWalking Component

Python Agent (apache/skywalking-python)

What happened

1、my configure
python 3.7.3
skywalking 8.9.1

2、my python code as follows:
`import json
import requests
import base
from flask import Flask, request
from skywalking import agent, config

config.init(collector_address='127.0.0.1:11800', service_name='serviceA', log_reporter_active=True)
config.flask_collect_http_params = True
agent.start()
app = Flask(name)

@app.route('/get_beheaves', methods=['POST'])
def delete_regress_tasks():
print(111, request.headers)
input_param = request.get_json()
# Step1
url = "http://127.0.0.1:8884/is_adult"
headers = {
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=json.dumps(request.get_json()))
print('Step1:', response.text)
is_adult = json.loads(response.text)['is_adult']
# Step2
base.thread_test()
# Step3
ret = base.decide_beheave(is_adult)
return json.dumps(ret)

if name == 'main':
app.run(debug=True)
`
3. the oap-ui does not show my python serviceName

What you expected to happen

Problem: the oap-ui does not show my python serviceName
image

The OAP logs:
image

How to reproduce

ask for help

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already existspythonPython agent related

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions