Skip to content

Commit ccd6d00

Browse files
committed
refactor: update sw agent
1 parent 2031f58 commit ccd6d00

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
python {
7-
pip("apache-skywalking:0.8.0")
7+
pip("apache-skywalking:1.0.0")
88
pip("vertx-eventbus-client:1.0.0")
99
}
1010

sourceplusplus/SourcePlusPlus.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ def __init__(self, args: dict = None):
103103

104104
def attach(self):
105105
config.init(
106-
collector_address=self.probe_config["skywalking"]["collector"]["backend_service"],
107-
service_name=self.probe_config["skywalking"]["agent"]["service_name"],
108-
authentication=self.probe_config["skywalking"]["agent"].get("authentication"),
109-
log_reporter_active=True,
110-
force_tls=self.probe_config["spp"]["ssl_enabled"],
111-
log_reporter_formatted=self.probe_config["skywalking"]["plugin"]["toolkit"]["log"]["transmit_formatted"]
106+
agent_collector_backend_services=self.probe_config["skywalking"]["collector"]["backend_service"],
107+
agent_name=self.probe_config["skywalking"]["agent"]["service_name"],
108+
agent_authentication=self.probe_config["skywalking"]["agent"].get("authentication"),
109+
agent_log_reporter_active=True,
110+
agent_force_tls=self.probe_config["spp"]["ssl_enabled"],
111+
agent_log_reporter_formatted=self.probe_config["skywalking"]["plugin"]["toolkit"]["log"]["transmit_formatted"]
112112
)
113113
agent.start()
114114

@@ -141,8 +141,8 @@ def __send_connected(self, eb: EventBus):
141141
"language": "python",
142142
"probe_version": __version__,
143143
"python_version": sys.version,
144-
"service": config.service_name,
145-
"service_instance": config.service_instance
144+
"service": config.agent_name,
145+
"service_instance": config.agent_instance_name
146146
}
147147

148148
# add hardcoded probe meta data (if present)

sourceplusplus/control/ContextReceiver.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ def apply_log(live_log_id, globals, locals):
6262
sw_context = get_context()
6363
log_data = LogData(
6464
timestamp=round(time.time() * 1000),
65-
service=config.service_name,
66-
serviceInstance=config.service_instance,
65+
service=config.agent_name,
66+
serviceInstance=config.agent_instance_name,
6767
body=LogDataBody(
6868
type='text',
6969
text=TextLog(text=live_log.log_format)
@@ -75,7 +75,7 @@ def apply_log(live_log_id, globals, locals):
7575
),
7676
tags=log_tags,
7777
)
78-
agent.archive_log(log_data)
78+
agent.agent.archive_log(log_data)
7979

8080
if live_log.is_finished():
8181
try:

0 commit comments

Comments
 (0)