Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@vkedia
Copy link
Contributor

@vkedia vkedia commented Jan 23, 2018

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 23, 2018
<dependency>
<groupId>io.opencensus</groupId>
<artifactId>opencensus-api</artifactId>
<version>0.11.0</version>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make it a variable because it is used in few places?

<dependency>
<groupId>io.opencensus</groupId>
<artifactId>opencensus-impl</artifactId>
<version>0.11.0</version>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<scope>runtime</scope>

ZPageHandlers.startHttpServerAndRegisterAll(8080);
// Installs an exporter for stack driver.
StackdriverExporter.createAndRegister();
Tracing.getExportComponent().getSampledSpanStore().registerSpanNamesForCollection(Arrays.asList("CloudSpannerSample"));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private static final String CLOUD_SPANNER_SAMPLE_SPAN_NAME = "CloudSpannerSample";

Not necessary the long suggested variable name but that will ensure that the string is the same here and 10 lines below.

@bogdandrutu
Copy link

Also you can install the StackdriverStatsExporter as well to push grpc stats to monitoring, here are instructions:
https://github.com/census-instrumentation/opencensus-java/tree/master/exporters/stats/stackdriver

@lesv
Copy link
Contributor

lesv commented Jan 23, 2018

You might wish to add something about this to the README.md

@lesv
Copy link
Contributor

lesv commented Jan 23, 2018

@rakyll Once they make the changes you've asked for, add the kokoro-forcerun label before accepting or merging.

@lesv lesv added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 23, 2018
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 23, 2018
@bogdandrutu
Copy link

If you link the stats you also need to define the views (or what data to export), to do that do the following:

  • Add a compilation dependency on io.opencensus:opencensus-contrib-grpc-metrics:0.11.0
  • In the main function call io.opencensus.contrib.grpc.metrics.RpcViews.registerAllCumulativeViews()

@vkedia
Copy link
Contributor Author

vkedia commented Jan 23, 2018

Addressed all the comments. PTALA.
I am getting an exception while exporting stats:

Jan 23, 2018 9:30:04 AM io.opencensus.exporter.stats.stackdriver.StackdriverExporterWorker export
WARNING: ApiException thrown when exporting TimeSeries.
com.google.api.gax.rpc.UnavailableException: io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
	at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:69)
	at com.google.api.gax.grpc.GrpcExceptionCallable$ExceptionTransformingFuture.setException(GrpcExceptionCallable.java:118)
	at com.google.api.gax.grpc.GrpcExceptionCallable$ExceptionTransformingFuture.onFailure(GrpcExceptionCallable.java:101)
	at com.google.api.core.ApiFutures$1.onFailure(ApiFutures.java:61)
	at com.google.common.util.concurrent.Futures$4.run(Futures.java:1123)
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:435)
	at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:900)
	at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:811)
	at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:675)
	at io.grpc.stub.ClientCalls$GrpcFuture.setException(ClientCalls.java:492)
	at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:467)
	at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41)
	at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:684)
	at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41)
	at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:392)
	at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:475)
	at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:557)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:478)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:590)
	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
	at io.grpc.Status.asRuntimeException(Status.java:526)
	... 19 more
Caused by: java.io.IOException: Operation timed out
	at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
	at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
	at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
	at sun.nio.ch.IOUtil.read(IOUtil.java:192)
	at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
	at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288)
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1106)
	at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:343)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:123)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
	at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
	... 1 more

@vkedia
Copy link
Contributor Author

vkedia commented Jan 23, 2018

Enabling SD premium made it work.

@vkedia
Copy link
Contributor Author

vkedia commented Jan 23, 2018

@lesv Can you please approve.

@lesv lesv added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 23, 2018
@lesv
Copy link
Contributor

lesv commented Jan 23, 2018

Waiting on Kokoro.

@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 23, 2018
lesv
lesv previously approved these changes Jan 23, 2018
Copy link
Contributor

@lesv lesv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once kokoro is happy.

Copy link
Contributor

@kurtisvg kurtisvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passed Kokoro and @lesv approved earlier

@kurtisvg kurtisvg merged commit 41df694 into GoogleCloudPlatform:master Jan 23, 2018
@vkedia
Copy link
Contributor Author

vkedia commented Jan 23, 2018

Thanks!

minherz pushed a commit that referenced this pull request Nov 9, 2022
minherz pushed a commit that referenced this pull request Nov 10, 2022
minherz pushed a commit that referenced this pull request Nov 10, 2022
Shabirmean pushed a commit that referenced this pull request Nov 14, 2022
…1.2 (#1002)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.1` -> `26.1.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/compatibility-slim/26.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/confidence-slim/26.1.1)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost.

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dialogflow).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xOTguMSIsInVwZGF0ZWRJblZlciI6IjMyLjE5OC4xIn0=-->
Shabirmean pushed a commit that referenced this pull request Nov 15, 2022
…1.2 (#1002)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.1` -> `26.1.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/compatibility-slim/26.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/confidence-slim/26.1.1)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost.

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dialogflow).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xOTguMSIsInVwZGF0ZWRJblZlciI6IjMyLjE5OC4xIn0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.