我尝试通过上下文传播获取与同一跟踪上下文/traceId 关联的以下链中创建的所有跨度:
\n服务1 -> aws sqs 队列 -> 服务2
\n汽车。上下文传播不适用于 aws sqs 和 aws sdk v2 atm ( https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/3684 ),即使 AwsTraceHeader 实际上是在 sqs 消息中设置的,我必须明确地照顾它
\ntraceId=Span.current().getSpanContext().getTraceId()traceId并覆盖当前span.traceId /本质上创建service1的上下文然而,现在还不清楚如何实际覆盖 service2 创建的跨度中的 span.traceId ,这很令人困惑,因为例如使用 Golang 它似乎很简单:How to create opentelemetry span from a string traceid
\n我只看到 getters 例如Span.current().getSpanContext().getTraceId()\n 但没有 setters 或构建器方法。
更新:
\n即使创建一个新的跨度并将其设置为当前跨度(不确定这是否朝着正确的方向发展),也tracer.spanBuilder不会为traceId AFAIU提供设置器)
@Inject\nio.opentelemetry.api.trace.Tracer tracer;\n\nSpan consumeMessageSpan = tracer.spanBuilder("consumeMessage").startSpan();\n\nconsumeMessage.makeCurrent();\nRun Code Online (Sandbox Code Playgroud)\n … 我尝试用客户端程序将一些数据写入hbase
HBase @ Hadoop在Cloudera @ ubuntu的预配置VM中运行.
客户端在托管VM的系统上运行,并直接在VM中运行客户端.
所以现在我想使用vm之外的客户端来访问vm上的服务器
我正在使用NAT.为了能够访问像HBase Master这样的服务器,HUE ...在vm上运行我在虚拟框中配置了端口转发:
因此,我可以访问HBase Master的概述站点,HUE ..
要针对vm上的服务器运行客户端,我创建了带有内容的hbase-site.xml:
<configuration>
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>9997</value>
</property>
<property>
<name>hbase.master</name>
<value>localhost:9999</value>
</property>
</configuration>
Run Code Online (Sandbox Code Playgroud)
所以我期望转发工作:
运行客户端时日志中的错误消息如下所示:
11/09/07 17:48:00 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=180000 watcher=hconnection
11/09/07 17:48:00 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
11/09/07 17:48:01 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
at …Run Code Online (Sandbox Code Playgroud) 我只是想让admob运行并从这里测试不同的"工作"代码示例.它们都不起作用.
在我的活动中:
在OnCreate()
AdView ad = (AdView) findViewById(R.id.ad);
AdRequest r = new AdRequest();
r.addTestDevice("X3XFX518X7DE1FD879XA5XXAX1AX8BXX"); //no clue why this string
ad.loadAd(r);
Run Code Online (Sandbox Code Playgroud)
在视图定义中,我插入了以下内容(是的,而不是myPubID,实际上是我真正的PUB ID):
<com.google.ads.AdView
android:id="@+id/ad"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
ads:adUnitId="<myPubID>"
ads:adSize="BANNER"/>
Run Code Online (Sandbox Code Playgroud)
我得到的只是一个黑屏1秒钟.
在执行期间打印log(logcat)
08-09 10:45:03.527: INFO/ActivityManager(59): Start proc de.syrtec.android.bogloid for activity de.syrtec.android.bogloid/.StartSeite: pid=4402 uid=10043 gids={3003}
08-09 10:45:04.887: ERROR/Ads(4402): Could not get currentAdManager.
08-09 10:45:05.397: WARN/InputManagerService(59): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@450d4998
08-09 10:45:05.567: INFO/Ads(4402): To get test ads on this device, call adRequest.addTestDevice(AdRequest.TEST_EMULATOR);
08-09 10:45:06.159: INFO/Ads(4402): adRequestUrlHtml: <html><head><script src="http://www.gstatic.com/afma/sdk-core-v40.js"></script><script>AFMA_buildAdURL({"preqs":0,"u_sd":1.5,"slotname":"********;</script></head><body></body></html>
08-09 10:45:07.528: …Run Code Online (Sandbox Code Playgroud) 我只是尝试使用java客户端连接到hbase,它是cloudera-vm的一部分.
(192.168.56.102是vm的inet ip)
我使用虚拟盒与主机网络设置.
所以我可以访问hbase master的webUI @ http://192.168.56.102:60010/master.jsp
我的java客户端(在vm本身运行良好)也建立了与192.168.56.102:2181的连接
但是当它调用getMaster我得到连接被拒绝时看到log:
11/09/14 11:19:30 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=192.168.56.102:2181 sessionTimeout=180000 watcher=hconnection
11/09/14 11:19:30 INFO zookeeper.ClientCnxn: Opening socket connection to server /192.168.56.102:2181
11/09/14 11:19:30 INFO zookeeper.ClientCnxn: Socket connection established to cloudera-vm/192.168.56.102:2181, initiating session
11/09/14 11:19:30 INFO zookeeper.ClientCnxn: Session establishment complete on server cloudera-vm/192.168.56.102:2181, sessionid = 0x13267157f930009, negotiated timeout = 40000
11/09/14 11:19:32 INFO client.HConnectionManager$HConnectionImplementation: getMaster attempt 0 of 10 failed; retrying after sleep of 1000
java.net.ConnectException: Connection refused: …Run Code Online (Sandbox Code Playgroud) Android Studio安装向导(studio64.exe)无法获取某些XML.
我已经在studio64.exe.vmoptions中设置了
-Djava.net.preferIPv4Stack=true
-Dhttp.proxyHost=...
-Dhttp.proxyPort=...
Run Code Online (Sandbox Code Playgroud)
也试过了
-Dhttp.proxyHost=www.google.com
-Dhttp.proxyPort=80
Run Code Online (Sandbox Code Playgroud)
但没有任何作用,我没有发现任何有用的谷歌似乎我是唯一一个有这个问题.
细节:
Android SDK was installed to C:\Users\*\AppData\Local\Android\sdk
Refresh Sources:
Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list-2.xml, reason: Connection refused: connect
Fetched Add-ons List successfully
Refresh Sources
Failed to fetch URL http://dl-ssl.google.com/android/repository/repository-10.xml, reason: Connect Connection refused: connect
Refresh Sources:
Failed to fetch URL http://dl-ssl.google.com/android/repository/repository-10.xml, reason: Connect Connection refused: connect
There is nothing to install or update.
The following SDK component was not installed: build-tools-21.1.1
Run Code Online (Sandbox Code Playgroud)
我正在使用很多开发工具而没有问题,Android Studio现在是第一个出现连接问题的工具.
我提到的XML文件可以通过浏览器访问而没有任何问题.
我检查了文档和 stackoverflow,但没有找到合适的方法。例如,这篇文章看起来非常接近:使用 Quarkus/Mutiny 在 Reactive REST GET 端点中调度阻塞服务 但是,我不想在我的服务中出现太多不必要的样板代码,最好的情况是根本不需要更改服务代码。
我通常只想调用一个使用实体管理器的服务方法,因此是一个阻塞操作,但是,想要立即向调用者返回一个字符串,例如“查询开始”或其他内容。我不需要回调对象,这只是一种即发即忘的方法。
我尝试过这样的事情
@NonBlocking
@POST
@Produces(MediaType.TEXT_PLAIN)
@Path("/query")
public Uni<String> triggerQuery() {
return Uni.createFrom()
.item("query started")
.call(() -> service.startLongRunningQuery());
}
Run Code Online (Sandbox Code Playgroud)
但它不起作用 - >错误消息返回给调用者:
You have attempted to perform a blocking operation on a IO thread. This is not allowed, as blocking the IO thread will cause major performance issues with your application. If you want to perform blocking EntityManager operations make sure you are doing it from a worker thread.",
Run Code Online (Sandbox Code Playgroud)
我实际上希望 quarkus …
android ×2
cloudera ×2
hbase ×2
java ×2
quarkus ×2
admob ×1
amazon-sqs ×1
connect ×1
datanucleus ×1
hadoop ×1
mutiny ×1
resteasy ×1
virtualbox ×1