Skip to content

Commit

Permalink
Add service monitor for otel
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzhiguo committed Dec 17, 2024
1 parent 5ae6cee commit e829eb6
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 10 deletions.
2 changes: 1 addition & 1 deletion deploy/joylive-injector/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.3.5
version: 1.3.6

keywords:
- joylive
Expand Down
25 changes: 18 additions & 7 deletions deploy/joylive-injector/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ agent:
publisher:
configs:
traffic:
capacity: 20000
capacity: ${CONFIG_TRAFFIC_BUFFER_SIZE:40000}
plugin:
systems:
- system
Expand Down Expand Up @@ -59,7 +59,7 @@ agent:
type: ${CONFIG_LIVE_SPACE_API_TYPE:{{ .Values.agent.sync.liveSpace.type }}} # [file,multilive,multilive-openapi,nacos]
url: ${CONFIG_LIVE_SPACE_API_URL:{{ .Values.agent.sync.liveSpace.url }}}
service: true
interval: 5000
interval: 3000
timeout: 3000
initialTimeout: 20000
delay: 0
Expand All @@ -86,6 +86,11 @@ agent:
laneSpace:
type: ${CONFIG_LANE_SPACE_API_TYPE:{{ .Values.agent.sync.lane.type }}} # [file,jmsf,nacos]
url: ${CONFIG_LANE_SPACE_API_URL:{{ .Values.agent.sync.lane.url }}}
interval: 3000
timeout: 3000
initialTimeout: 20000
delay: 0
fault: 5000
# for jmsf
jmsf:
spacesUrl: /laneSpaces
Expand All @@ -102,9 +107,11 @@ agent:
type: ${CONFIG_SERVICE_API_TYPE:{{ .Values.agent.sync.microservice.type }}} # [file,jmsf,nacos]
url: ${CONFIG_SERVICE_API_URL:{{ .Values.agent.sync.microservice.url }}}
headers: ${CONFIG_SERVICE_API_HEADERS}
interval: 5000
interval: 3000
timeout: 3000
initialTimeout: 20000
delay: 0
fault: 5000
# for jmsf
jmsf:
serviceUrl: /space/${space}/service/${service_name}/version/${service_version}?application=${application}
Expand Down Expand Up @@ -137,7 +144,7 @@ agent:
enabled: ${CONFIG_TRANSMISSION_ENABLED:true}
threadpool: ${CONFIG_TRANSMISSION_THREADPOOL_ENABLED:true}
registry:
enabled: ${CONFIG_REGISTRY_ENABLED:true}
enabled: ${CONFIG_REGISTRY_ENABLED:${CONFIG_FLOW_CONTROL_ENABLED}}
flowcontrol:
enabled: ${CONFIG_FLOW_CONTROL_ENABLED:{{ .Values.agent.switch.flowcontrol }}}
localhost: ${CONFIG_LOCALHOST_ENABLED:false}
Expand All @@ -161,6 +168,7 @@ agent:
localFirstMode: ${CONFIG_LOCAL_FIRST_MODE:CELL}
serviceGroups: ${CONFIG_SERVICE_GROUPS:}
serviceGroupOpen: ${CONFIG_SERVICE_GROUP_OPEN:true}
responseException: ${CONFIG_RESPONSE_EXCEPTION:true}
warmups: ${CONFIG_WARMUP_SERVICES:}
systemPaths: ${CONFIG_SYSTEM_HTTP_PATHS}
concurrencyLimiter:
Expand All @@ -178,13 +186,16 @@ agent:
type: Resilience4j
cleanInterval: 30000
expireTime: 60000
monitor:
forwardEnabled: ${CONFIG_MONITOR_FORWARD_TRAFFIC_ENABLED:}
rejectEnabled: true
live:
fallbackLocationIfNoSpace: ${CONFIG_FALLBACK_LOCATION_IF_NO_SPACE:false}
topics: ${CONFIG_LIVE_TOPICS}
modifyMQGroupEnabled: ${CONFIG_LIVE_MODIFY_MQ_GROUP:false}
modifyMQGroupEnabled: ${CONFIG_LIVE_MODIFY_MQ_GROUP:true}
lane:
topics: ${CONFIG_LANE_TOPICS}
modifyMQGroupEnabled: ${CONFIG_LANE_MODIFY_MQ_GROUP:false}
modifyMQGroupEnabled: ${CONFIG_LANE_MODIFY_MQ_GROUP:true}
router:
virtual: ${CONFIG_VIRTUAL_SIZE:500}
spring:
Expand Down Expand Up @@ -276,4 +287,4 @@ agent:
exporter:
type: ${CONFIG_COUNTER_EXPORTER_TYPE:{{ .Values.agent.exporter.type }}}
endpoint: ${CONFIG_COUNTER_EXPORTER_ENDPOINT:{{ .Values.agent.exporter.endpoint }}}
timeout: 5000
timeout: 5000
26 changes: 26 additions & 0 deletions deploy/joylive-injector/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
annotations:
meta.helm.sh/release-name: brolly
meta.helm.sh/release-namespace: brolly
labels:
app.kubernetes.io/instance: brolly
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: monitor
app.kubernetes.io/system: brolly
integration: tpaas-jmsf-otel
inputType: integrations
release: brolly
name: tpaas-jmsf-otel
namespace: brolly
spec:
endpoints:
- port: prometheus
interval: 10s
namespaceSelector:
any: true
selector:
matchLabels:
app: opentelemetry
component: otel-collector
4 changes: 2 additions & 2 deletions deploy/joylive-injector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ agent:
type: otlp.grpc # otlp.grpc
endpoint: http://otel-collector.joylive.svc:4317
switch:
live: true
live: false
lane: false
flowcontrol: true
flowcontrol: false

otel:
replicas: 2
Expand Down

0 comments on commit e829eb6

Please sign in to comment.