Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#43 fix application name for metrics & update docs #121

Merged
merged 1 commit into from
May 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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