<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Enhancement%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical enhancement to an existing feature.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22Issue+Type%3A+Enhancement%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed enhancements.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the if the same enhancement was already implemented in the<br>
master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues in this issue<br>
(If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<p dir="auto">None that I'm aware of</p>
<h1 dir="auto">Brief Summary</h1>
<p dir="auto">Logging <code class="notranslate">args</code> is really helpful, but it's currently only done with <code class="notranslate">Rejected</code> logs and it would be nice to also include in <code class="notranslate">Received</code> logs</p>
<p dir="auto">See </p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/celery/celery/blob/f02d7c60051ce5202349fe7c795ebf5000d9526d/celery/app/trace.py#L259">celery/celery/app/trace.py</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 259
      in
      <a data-pjax="true" class="commit-tease-sha" href="/celery/celery/commit/f02d7c60051ce5202349fe7c795ebf5000d9526d">f02d7c6</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L259" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="259"></td>
          <td id="LC259" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s">'args'</span>: <span class="pl-s1">sargs</span>, </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<h1 dir="auto">Design</h1>
<h2 dir="auto">Architectural Considerations</h2>
<p dir="auto">If a task takes a lot of args or large args, then it could make logs large</p>
<h2 dir="auto">Proposed Behavior</h2>
<p dir="auto">Include <code class="notranslate">args</code> in <code class="notranslate">Received</code> logs</p>
<h2 dir="auto">Proposed UI/UX</h2>
<p dir="auto">On by default with a way to turn it off</p>
<h2 dir="auto">Diagrams</h2>
<p dir="auto">N/A</p>
<h2 dir="auto">Alternatives</h2>
<p dir="auto">Off by default with a way to turn it on</p>
<h2 dir="auto">Checklist</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -&gt; celery:4.0.2 (latentcall) kombu:4.0.2 py:3.6.1
            billiard:3.5.0.2 py-amqp:2.1.4
platform -&gt; system:Darwin arch:64bit imp:CPython
loader   -&gt; celery.loaders.default.Loader
settings -&gt; transport:amqp results:disabled"><pre class="notranslate"><code class="notranslate">software -&gt; celery:4.0.2 (latentcall) kombu:4.0.2 py:3.6.1
            billiard:3.5.0.2 py-amqp:2.1.4
platform -&gt; system:Darwin arch:64bit imp:CPython
loader   -&gt; celery.loaders.default.Loader
settings -&gt; transport:amqp results:disabled
</code></pre></div>
<h2 dir="auto">Steps to reproduce</h2>
<ol dir="auto">
<li>Create a task that retries via raise <code class="notranslate">self.retry()</code></li>
<li>Call the task with <code class="notranslate">send_task</code> and set <code class="notranslate">expires</code></li>
</ol>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">The task should retry until the expires time is hit or the max_retries value is hit</p>
<h2 dir="auto">Actual behavior</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
  File &quot;/usr/lib/python3.6/site-packages/celery/app/task.py&quot;, line 684, in retry
    S.apply_async()
  File &quot;/usr/lib/python3.6/site-packages/celery/canvas.py&quot;, line 221, in apply_async
    return _apply(args, kwargs, **options)
  File &quot;/usr/lib/python3.6/site-packages/celery/app/task.py&quot;, line 535, in apply_async
    **options
  File &quot;/usr/lib/python3.6/site-packages/celery/app/base.py&quot;, line 729, in send_task
    root_id, parent_id, shadow, chain,
  File &quot;/usr/lib/python3.6/site-packages/celery/app/amqp.py&quot;, line 334, in as_task_v2
    expires = expires and expires.isoformat()
AttributeError: 'str' object has no attribute 'isoformat'"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/celery/app/task.py", line 684, in retry
    S.apply_async()
  File "/usr/lib/python3.6/site-packages/celery/canvas.py", line 221, in apply_async
    return _apply(args, kwargs, **options)
  File "/usr/lib/python3.6/site-packages/celery/app/task.py", line 535, in apply_async
    **options
  File "/usr/lib/python3.6/site-packages/celery/app/base.py", line 729, in send_task
    root_id, parent_id, shadow, chain,
  File "/usr/lib/python3.6/site-packages/celery/app/amqp.py", line 334, in as_task_v2
    expires = expires and expires.isoformat()
AttributeError: 'str' object has no attribute 'isoformat'
</code></pre></div>