-
Notifications
You must be signed in to change notification settings - Fork 329
Allow configuring zipkin URL for zipkin-ui image #134
Comments
I think this will be fixable in tandem with a change in zipkin-ui. We just need a quorum on how this will be sent to the javascript |
@Rurouni @adriancole it's easy, just pass env at you compile zipkin-ui. Find keyword @Injectable()
export class ZipkinService {
traces: Trace[];
baseUri: string;
basePort: string;
services: string[];
constructor( @Inject(Http) private http: Http) {
this.baseUri = process.env.ZIPKIN_HOST || 'localhost';
this.basePort = process.env.ZIPKIN_PORT || '9411';
this.traces = null;
}
getServices() {
this
.http
.get(`http://${this.baseUri}:${this.basePort}/api/v1/services`, {})
.subscribe(res => {
this.services = <string[]>(res.json());
this.services.push('[any]');
this.services.sort();
});
} just 2 files you should change:
I will make a docker image for run in k8s. |
thanks for the offer to help. I think these changes will be
…On Wed, Mar 22, 2017 at 9:49 PM, CharlesCui ***@***.***> wrote:
@Rurouni <https://github.com/Rurouni> @adriancole
<https://github.com/adriancole> it's easy, just pass env at you compile
zipkin-ui.
Find keyword baseUri in zipkin-ui, in the content you could write some
code like:
@Injectable()export class ZipkinService {
traces: Trace[];
baseUri: string;
basePort: string;
services: string[];
constructor( @Inject(Http) private http: Http) {
this.baseUri = process.env.ZIPKIN_HOST || 'localhost';
this.basePort = process.env.ZIPKIN_PORT || '9411';
this.traces = null;
}
getServices() {
this
.http
.get(`http://${this.baseUri}:${this.basePort}/api/v1/services`, {})
.subscribe(res => {
this.services = <string[]>(res.json());
this.services.push('[any]');
this.services.sort();
});
}
just 2 files you should change:
➜ zipkin-ui git:(daily/1.2.0) ✗ ack baseUri
src/app/tracegraph/tracegraph.component.ts
12: baseUri: string;
16: this.baseUri = process.env.ZIPKIN_HOST || 'localhost';
24: .get(`http://${this.baseUri}:${this.basePort}/api/v1/dependencies?endTs=1474206961061&lookback=86400000`, {})
src/app/zipkin/zipkin.ts
157: baseUri: string;
162: this.baseUri = process.env.ZIPKIN_HOST || 'localhost';
170: .get(`http://${this.baseUri}:${this.basePort}/api/v1/services`, {})
184: var uri = `http://${this.baseUri}:${this.basePort}/api/v1/traces?endTs=${endTs}&lookback=${lookback}&annotationQuery=&limit=${limit}&minDuration=${minDuration}&spanName=all`;
I will make a docker image for run in k8s.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#134 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAD615mZWMTAyAhvcCKwYExtBFinmot2ks5roSb0gaJpZM4MI86U>
.
|
openzipkin-attic/zipkin-ui#34 suggests separate env variables to assign this.. like Personally, I like |
@adriancole mount a url path is a good idear.I have mount ui at /zipkin with expressjs server and httpProxy serve it. |
This changes the zipkin-ui image to rewrite nginx configuration on start based on the `ZIPKIN_BASE_URL` variable, which defaults to 'http://zipkin:9411'. Users can change this variable to point at a different zipkin host such as a kubernetes pod. See openzipkin-attic/zipkin-ui#38 Fixes #134
This changes the zipkin-ui image to rewrite nginx configuration on start based on the `ZIPKIN_BASE_URL` variable, which defaults to 'http://zipkin:9411'. Users can change this variable to point at a different zipkin host such as a kubernetes pod. See openzipkin-attic/zipkin-ui#38 Fixes #134
Thanks for all the patience and the help I re-pushed docker images for 1.22.1 including a now working zipkin-ui image! |
At the moment in the zipkin-ui image nginx config has hardcoded
http://zipkin:9411
https://github.com/openzipkin/docker-zipkin/blob/master/zipkin-ui/nginx.conf#L51Works for compose but won't work with kubernetes pod for example (it needs to be localhost there)
It would be great if this docker image allowed configuring ZIPKIN_HTTP_ENDPOINT env var
Thank you
The text was updated successfully, but these errors were encountered: