Skip to content

Commit

Permalink
Merge pull request #121 from sunyl527/master-upstream
Browse files Browse the repository at this point in the history
#43 fix application name for metrics & update docs
  • Loading branch information
gudaoxuri committed May 15, 2019
2 parents 2dea6d7 + 161715a commit ed0db54
Show file tree
Hide file tree
Showing 9 changed files with 485 additions and 146 deletions.
62 changes: 31 additions & 31 deletions devops/it/src/it/helloworld-backend/expected/Deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,36 +32,36 @@ spec:
group: ms.dew.devops.it
spec:
containers:
- env:
- name: JAVA_OPTIONS
value: ' -Dspring.profiles.active=test -Dserver.port=8080 -Dopentracing.jaeger.log-spans=false
-Dopentracing.jaeger.probabilistic-sampler.sampling-rate=0.1 -Dmanagement.endpoints.web.exposure.include=*
-Dmetrics.tags:application=${spring.application.name}'
image: "@ignore@"
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
httpGet:
path: /actuator/health
port: 8080
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 30
name: dew-app
ports:
- containerPort: 8080
name: http
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /actuator/health
port: 8080
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 30
resources:
limits: {}
requests: {}
- env:
- name: JAVA_OPTIONS
value: ' -Dspring.profiles.active=test -Dserver.port=8080 -Dopentracing.jaeger.log-spans=false
-Dopentracing.jaeger.probabilistic-sampler.sampling-rate=0.1 -Dopentracing.spring.web.skip-pattern=/api-docs.*|/swagger.*|.*\\.png|.*\\.css|.*\\.js|.*\\.html|/favicon.ico|/hystrix.stream|/actuator.*
-Dmanagement.endpoints.web.exposure.include=* -Dmanagement.metrics.tags.application=helloworld-backend'
image: "@ignore@"
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
httpGet:
path: /actuator/health
port: 8080
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 30
name: dew-app
ports:
- containerPort: 8080
name: http
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /actuator/health
port: 8080
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 30
resources:
limits: {}
requests: {}
nodeSelector:
group: app
4 changes: 2 additions & 2 deletions devops/it/src/it/helloworld-frontend/.dew
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ profiles:
serverConfig: |-
server {
listen 80;
server_name brian.com;
server_name localhost;
location / {
root html/brian;
root /usr/share/nginx/html;
index index.html index.htm;
}
if ( $http_host ~* "^(.*)") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ metadata:
dew.ms/scm-url: "@ignore@"
sidecar.jaegertracing.io/inject: 'true'
labels:
app: todo-compute
app: compute
provider: dew
version: "@ignore@"
group: ms.dew.devops.it
name: todo-compute
name: compute
namespace: dew-prod
spec:
replicas: 1
Expand All @@ -35,8 +35,8 @@ spec:
- env:
- name: JAVA_OPTIONS
value: ' -Dspring.profiles.active=prod -Dserver.port=8080 -Dopentracing.jaeger.log-spans=false
-Dopentracing.jaeger.probabilistic-sampler.sampling-rate=0.1 -Dmanagement.endpoints.web.exposure.include=*
-Dmetrics.tags:application=${spring.application.name}'
-Dopentracing.jaeger.probabilistic-sampler.sampling-rate=0.1 -Dopentracing.spring.web.skip-pattern=/api-docs.*|/swagger.*|.*\\.png|.*\\.css|.*\\.js|.*\\.html|/favicon.ico|/hystrix.stream|/actuator.*
-Dmanagement.endpoints.web.exposure.include=* -Dmanagement.metrics.tags.application=compute'
image: "@ignore@"
imagePullPolicy: IfNotPresent
livenessProbe:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ spec:
- env:
- name: JAVA_OPTIONS
value: ' -Dspring.profiles.active=prod -Dserver.port=8080 -Dopentracing.jaeger.log-spans=false
-Dopentracing.jaeger.probabilistic-sampler.sampling-rate=0.1 -Dmanagement.endpoints.web.exposure.include=*
-Dmetrics.tags:application=${spring.application.name}'
-Dopentracing.jaeger.probabilistic-sampler.sampling-rate=0.1 -Dopentracing.spring.web.skip-pattern=/api-docs.*|/swagger.*|.*\\.png|.*\\.css|.*\\.js|.*\\.html|/favicon.ico|/hystrix.stream|/actuator.*
-Dmanagement.endpoints.web.exposure.include=* -Dmanagement.metrics.tags.application=kernel'
image: "@ignore@"
imagePullPolicy: IfNotPresent
livenessProbe:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ spec:
- env:
- name: JAVA_OPTIONS
value: ' -Dspring.profiles.active=prod -Dserver.port=8080 -Dopentracing.jaeger.log-spans=false
-Dopentracing.jaeger.probabilistic-sampler.sampling-rate=0.1 -Dmanagement.endpoints.web.exposure.include=*
-Dmetrics.tags:application=${spring.application.name}'
-Dopentracing.jaeger.probabilistic-sampler.sampling-rate=0.1 -Dopentracing.spring.web.skip-pattern=/api-docs.*|/swagger.*|.*\\.png|.*\\.css|.*\\.js|.*\\.html|/favicon.ico|/hystrix.stream|/actuator.*
-Dmanagement.endpoints.web.exposure.include=* -Dmanagement.metrics.tags.application=notifier'
image: "@ignore@"
imagePullPolicy: IfNotPresent
livenessProbe:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ private String setJavaOptionsValue(FinalProjectConfig config) {
}
if (config.getApp().getMetricsEnabled()) {
containerEnvJavaOptionsValue += " -Dmanagement.endpoints.web.exposure.include=*"
+ " -Dmetrics.tags:application=${spring.application.name}";
+ " -Dmanagement.metrics.tags.application=" + config.getAppName();
}
return containerEnvJavaOptionsValue;
}
Expand Down
Loading

0 comments on commit ed0db54

Please sign in to comment.